Vim automatically looks at the file extension as well as the file content to determine a syntax highlighting scheme. Make sure your bash script has a ".sh" at the end and starts with a "#!/usr/bin/sh"
You can check the filetype vim is using for syntax highlighting with
:set filetype
or change it to bash for a session with
:set filetype=sh