Lostinfrance's answer has some very good point, but I think that the main factor is missing, IMHO.
What is responsible for the spreading of a language?
The main factor is the movement of human population.
One needs to first understand what is a language: it is a tool used by people to exchange and communicate.
The early history of Human languages is, in that sense, very interesting. For example, one can see the different language families that span Europe, and see where they came from. There are still some studies, but the Human migration is shown to be strongly related to the language spread following the lines of
Different migration waves could be observed in Europe. And each of those can be connected to one or more language. To simplify, Western Europe saw several waves amongst which
- Celtic (ca. 500 BC),
- Italic (ca. 50 BC),
- Germanic (ca. 500 AD).
Those populations brought in their languages with them. Now when the place was already inhabited by a sizeable population, those populations will need to communicate. I can imagine that they, at first will form some kind of pidgin (a simplified communication mean steaming from two or more languages), which would later develop into a new/different language.
To illustrate that, English, Dutch, Scandinavian languages and German trace (part of) their origin to the Saxons.
So if consider the migrations as being the vector of the spread, the main causes are
- "economic" (food/resources),
- politics, e.g. Roman conquests,
- religious? but I never came upon one in Early history.
More recent history
More recently, there were less large movement of populations in Western Europe.
As a consequence the languages haven't moved so much. The borders were, of course not fixed, but as early as the 9th Century AD, pre-French and pre-German was used in what is now France and Germany. Latin in Italy, etc.
Lostinfrance mentioned war conquests as a strong vector. And it could be. But usually the "elites" would take the language of the conqueror, whereas the rest of the population would not. There are many examples of that:
- Latin was kept to elites in most of the Roman Empire. Exceptions are the influence within countries that are still using latin-based languages nowadays, which, indicently are closed to Italy and to Rome.
- French in England was only spoken by the nobles, and eventually disappeared.
- The Franks were German tribes, but lost their German pretty fast upon conquering what would be France.
- Mongols had a huge Empire, but few local languages were affected by their own language.
- Spain (or part of) was under Arabic rule for 700 years, but Arabic isn't the language used there.
The only example of a real success that I can think of is the Arabic spoken in North-Africa. But even there, after centuries of Arabic language as the official language, there are still in Morocco people who only speak Berber (albeit not many).
Nevertheless, all those military conquests have influence over the language spoken in the country. Most illustrous is the strong influence that French had on English: about 29% of English words are from French origin, even before direct latin contacts. And actually the influence of both German and English languages are important contributing factors in the separation of French and other latin-based languages.
Another very important point to take into account is that languages are like living creatures. They evolve on their own. Every region of the world get a language that result from the origins of the people that live there, and the languages used by neighbouring countries (due to commercial exchange they need to communicate with each other). Due to that, it is often easy for native speakers to identify the origin of other native speakers:
- Hardly an English speaker would fail to recognise a Scotsman.
- Most of the Spanish-speaking world would spot immediately an Argentinian.
- Someone from Quebec would most of the time be clearly identified in France.