I think node.js has a lot to do with the occurrence of this phenomenon:
http://nodejs.org/
Pretty sure that this served as an impetus for the development of the commonjs library, etc.
I see comments that it makes life easier when both client and server code are in the same language. For the node project I was working on, there were only 3 programmers in everything, and we were more or less provided with carte blanche to use any technology we wanted. This led to some debate, as everyone had a different experience; but when someone suggested nodejs, one of the reasons it seemed like a good idea was that javascript was something in common that we all had.
However, I do not think that the success of node is mainly because it uses js; it's about design. I liked it a lot more than most of the other server-side technologies I worked with (Rails, PHP, cgi, mod_perl, mason), and I probably would have liked it the same way, regardless of the language used in the interface. But js it.
So, my point of view: I think this has less to do with anything, in particular with javascript, and more with some clever thinking and development that continues in the “javascript community”, an unexpected surprise. Consider PHP: I don’t think that the success of PHP had much to do with the design (or performance characteristics) of the language, I think that it had to do with the nature of how it is used and how people thought about server-side programming 10-15 years ago and (closely related) tools on which they should have relied.
One of the questions (in the "smart thinking" department) is the (very convincing, if you try) statement made by people from node and, for example, nginx, that the asynchronous, event-driven model is better suited for server-side programming than the traditional parallel synchronous flow-controlled model. I believe that later ones prevail in java, even, apparently, it can be just as easily used in a different way. Javascript, on the other hand, was intended to be used in an asynchronous, event-driven browser world and has no threads at all. Again: not so much a language as a culture.
It is also worth noting the predominant use of JSON as an exchange format and NoSQL databases such as couchdb (which I used) and mongodb (which I do not have) that make fundamental use of JSON in db structuring. Couchdb also uses js for server-side programming (mainly request handlers), presumably because the database documents are in JSON, which is also nice to pass to the client. Very sleek and smart. One language, one protocol, from a model to view; in a significant sense, there is no "exchange" at all.