This, exactly. A language is a tool like any other. Sometimes you use a hammer, sometimes you use a screwdriver.
The language is also more than just the syntax (which is the least interesting, but often most obsessed over aspect of a programming language); it is the ecosystem surrounding that syntax, with the libraries written in it and the community using it.
Knowing Java is great not because the syntax is great (though it's getting better); it has the most libraries developed for it, which means you can build very large scale applications without reinventing wheels. Ruby has a great ecosystem for design-centric web development. Python has a great ecosystem with lots of libraries for scientific and numeric processing and so on. PHP has a great ecosystem for smaller websites, e-commerce, etc.; it's a perfectly decent language for that type of job, but you wouldn't want to try to build an inventment bank's risk engine using it.
Great reply. Thank you!