As other posters say: there is no best language for web applications. However, some languages have richer options for web programming - libraries and frameworks. Popularity also makes it's easier to find answers and tutorials. Other things to consider: ease of deployment, performance.
It's fine to use a programming language not normally known for web programming. Just remember if web-related libraries and documentation doesn't exist, you will need to write them yourself.