It's obvious that the emergence of agriculture must have made a considerable impact on the languages of prehistoric people. First, as a source of new vocabulary and linguistic structures for the new social reality; second, as a new scenario for the spread of languages and the appearance of stratified variants. Unfortunately, it is impossible for us to know the languages that the first farmers spoke, as there is no direct evidence of them. However, the analysis of indirect sources (linguistic, archaeological, genetic, etc.) has allowed linguists to come up with some interesting results. Associating the spread of a given group of languages with the spread of agriculture is a strong argument, and it has been used in the various areas where agriculture was independently developed: the Near East, the Indus Valley, China, Mesoamerica, etc. As far as I know, there isn't a generally agreed pattern of how agriculture and language may have expanded in parallel. Authors such as Colin Renfrew, in the context of the processual approach, have made interesting proposals about the combined process of agriculture-language spread, but it seems there's still much to be done in this field of study.
What about the Indo-Europeans? The expansion of IE languages has traditionally been seen as occurring some millennia after the expansion of agriculture. In this blog I have variously criticized this traditional view, which is based on a series of assumption which are quite dubious. I have presented some alternative views, including Renfrew's Anatolian Hypothesis (see here), which links the spread of IE with the spread of agriculture from the Anatolian Peninsula. Needless to say, Renfrew's theory has been strongly criticised by mainstream Indo-Europeanists, who stick to their intra-linguistic approach. I find the Anatolian Hypothesis quite interesting, and I'm sure that the spread of agriculture and pastoralism must have made a crucial impact on the languages of the IE area, as anywhere else in the world, but there are some problems associated with this theory that are not easy to solve. It is true that Renfrew's hypothesis offers a plausible scenario for the spread of IE languages in Europe, but for the events in the other areas (Iran, India, Central Asia) a different, possibly more complex explanation is required. Was agriculture a local development in the Indus Valley or was it imported from another place? The former option looks more likely. And one more, and essential, question: what kind of language did the first Indus Valley farmers speak?
We tend to think that new languages, e.g. the ones brought by the first farmers or by any other migratory or expansionist group, is basically different from the language of the original population, and that the new situation triggers a process of language substitution whereby the old language simply disappears. But it doesn't have to be this way. Maybe the languages associated with the Neolithic expansion were not so different from the ones spoken by European Mesolithic populations. And something similar could be said about the Indus Valley. What we would have here is a common IE background and a double process of language expansion (or re-expansion) associated with agriculture. This is just a hypothesis, of course, but I think it makes at least some sense.
Note: the map (see above) has been taken from this page.