I know that this is as much a biology and prehistory question as a historical one, but presumably there are some records out there about the spread of dairy diets into the historical periods or issues of lactose intolerance.
The genes for lactose tolerance in humans seem to have arisen fairly recently, just before the start of the historical period and likely leaving many archaeological remains and historical traces. How do we construct the way that lactose tolerance/intolerance has worked as these genes and the concomitant cultural and dietary practices have made their way throughout the human species?
First the genetics: lactose tolerance is a dominant gene. Which means that if only one of your parents has lactose tolerance you have at least a 50% chance of having it as well, which greatly aids the expression of the trait in the population.
Second, the evolutionary advantage. Lactose tolerance would have the greatest benefit in circumstances where winters are harsh (which often causes high child mortality) and a dairying tradition (and, of course, the prerequisites for dairying: domesticated cattle and an environment with sufficient fodder such as grasses). Precisely these conditions exist in late neolithic Northern and Central Europe.
Lactose tolerance provides multiple nutritional benefits. It allows for the digestion of lactose, of course, which adds a significant proportion of available calories when ingesting milk and high lactose cheeses and other dairy products. Even more importantly, it makes it possible to eat an arbitrarily large amount of lactose containing foods. A lactose intolerant person can only consume around a cup (a quarter of a liter) of milk per day without experiencing gastrointestinal distress. Consuming much more than that results in diarrhea and thus a net negative caloric intake.
Which then provides an even more drastic evolutionary dichotomy between lactose tolerance and intolerance in a population. If survival into adulthood is marginal and dairy products containing lactose are available in significant amounts then those with tolerance will experience a substantial caloric bonus while those with lactose intolerance will experience a caloric deficit due to experiencing diarrhea more often. If dairying is an easy way to increase food production then this becomes a very strong feedback loop, more dairy in the diet leads to more calories for the lactose tolerant and fewer for the lactose intolerant.
During the neolithic especially there weren't many conditions where experiencing routine diarrhea would not have significantly reduced your chances of survival. There's a very strong correlation in pre-industrial societies between nutritional intake and overall survival rates.
Interestingly, the genes providing Northern Europeans with lactose tolerance are also present in small incidences in North African and Near Eastern populations, indicating that the mutations likely originated long before they were heavily selected for.