AFAIK, there isn't a single bash command to find out the version of a program. Finding out the version of a program depends on the program! Usually a program will take a flag telling it to spit out the version (e.g. -v, -version, or --version.) For example
eric.r.turner@dijkstra:~$ gcc --version
gcc (GCC) 3.2.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.