For every use-case you'll encounter, there is so many answers.
There is no "when you want to do X, use language Y" guide, because it would be pretty stupid. Every good programming language can be used for nearly all your programming needs.
The only thing you need to keep in mind, is where the target program should run (and the list is very small):
- should the target program run in a browser? Use Javascript or a language that compiles to it (Coffeescript, Dart, TypeScript, ...)
- should the target program run on an embedded board (very low memory footprint, very low CPU cycles available)? Use a language with manual memory management: C, C++, Nimrod, Rust, D ...
- should the target program takes the most performance out of the hardware (games, HPC, performant system library, ...)? Use a language that makes fast executables: C, C++, Nimrod, Rust, D, Go, ...
- should the target program runs on a web server? On a desktop computer? Any case that doesn't fit the previous three? Use whatever language you want or are familiar with, they all can do it, and there is no "best choice".