I think the answer to this question has been suggested in quite a few threads, but perhaps never really in depth. I shall make a try:
Scientists have always debated this question, and pointed as different reasons to as why man moved from being purely hunter-gatherers to being purely agricultural. The debate will rage of forever, though it is a bit pointless. There are several answers, and all are equally correct. Just like there are an infinite number of nuances of grey, there being also black and white.
The truth is that we words like “neolithic”, “paleolithic”, “bronze age” and so forth, are ideals, not realities. There never was a society that was completely anything, but only degrees. To this day there is a lot of hunting and gathering in every country in the world. Of course, the absolute majority of mankind doesn’t do it to truly survive, but more as an addition to other things, or as recreation. As late as one or two centuries ago, most people in the Western world saw “gathering” activities as very important in their survival, without which life would have been much harder. If we go really far back, neolithic societies most likely received a large portion of their nutrition from activities not strictly “agricultural”. If you get a third of your food from growing crops on fields, a third from gathering, and a third from hunting… are you a hunter-gatherer?
Even back in really old times, before sedentary agriculture, our nomad ancestors knew that certain areas were more rich in certain grasses, roots, berries or other vegetable foods. And every once in a while, maybe every month, maybe every year, maybe every few years, our ancestors would return to such a place. They were smart enough to understand that plants, just like animals, compete, and that removing the competition, would probably help others. By “weeding out” unwanted plants, they would make it easier for desirable plants to grow. In the same way, many berry pickers know to regularly do some “gardening” on their favourite patch in the forest. Is that agriculture, or gathering…?
Humans also helped the growth in other ways, like preventing herbivores from taking our food. If we know that a certain patch will be really rich with good food every year in spring, we could protect it from animals by making a simple fence out of branches, around the patch. Is that agriculture, or gathering…?
There is also a less appetizing variable to consider: the way humans disperse seeds, and therefore propagate a certain plant species. Human faeces are an excellent fertilizer for most seeds, and it is likely that some of the first true “gardens” or “farms”, appeared spontaneously where human beings had previously established a “toilet”. Imagine eating an apple whole! A few months later, a apple tree starts growing where you left the remains of the apple
Drawing a line between Neolithicum and Mesolithicum is therefore very difficult. When did farming pass from being just something on the side, to being the main source of your food?
One thing is clear: mankind gradually spread from Africa out through the Middle-east, onwards. Before mankind arrived, there was no population density. Once man arrived, population density started rising, very slowly, generation by generation, more and more people inhabiting the land, more tribes, more clans, more bands, spreading from the seas through the deep forests up the hills, all over every meter of the planet, all the way to Hawai’i. Gradually, food became scarcer and scarcer, and man needed to devote more time and effort towards getting enough of it.
At the same time, technology improved. Generation by generation, small incremental changes improved the quality of our tools, and our knowledge of nature. It took time before mankind learned that faeces from animals or humans improved the growth of many crops. It took time to realise that the small, inedible, pieces inside fruits and berries, were actually seeds, that could be planted to spread the crop. Fishing techniques improved, as did hunting techniques.But as game became more and more scarce, more time and effort has to be afforded gathering plants and roots… the precursor to regular farming.
Climate change is important here. Just like human beings are thought by some scientists to have developed from apes through the rainforests giving way to savannas, behooving the apes to adapt to walking on the ground, on two legs, rather than swinging from branches, so do some scientists suggest that changes in climates forces human beings to quickly find new sources of food, and improve the yields of any surviving sources of food, by using them intensively: farming. An often suggested image is that great bands of people moving away from the savanna that was changing into desert, towards river valleys, where there was still water and life. And when the game in that area was eaten, and the fish likewise, people had to do everything to make roots, berries, seeds and other similar food sources grow as much as possible, tending them and protecting them, naturally staying mostly in the same area, not moving around, leaving the crops to die.
Geography also plays an important role. Agriculture never appeared if there was no plant that could be used in agriculture. This is believed to be the reason that much of sub-Saharan Africa, or North America, or the eastern half of South America, or Australia, developed so little before the coming of the Europeans. Most edible foods that can be used as intensive food crops originate from a few select areas in the world, like the Fertile Crescent, the Yellow River valley, or parts of modern day Mexico. Sure, there are naturally edible plants elsewhere, almost everywhere… but not as many, not as easy to live off, nor as rich in nutrients. Agriculture therefore was bound to develop in areas where these crops appeared, especially if such an area contain micro-areas very suitable of intensive agriculture. Sure, wheat may come from the Zagros mountains, but it grew much better in the flood plains of the Euphrat and the Tigris, tended by humans.
The same is true of animals suitable for taming, domestication, and eating. Cattle, pigs, horses, sheep, goats, dogs, cats, chickens, ducks, rabbits and so forth, appeared naturally only in a few regions in the world. And even though dogs appeared everywhere… how can a dog compete with a pig or cow, in terms of productivity? So even though they Aborigines in Australia had dingos, they could not build agriculture on that. Nor could the Incas or Mayans or Aztecs build agriculture in the same way as Europeans or Asians, solely from guinea pigs or llamas.
Then consider geography in terms of climate zones. Eurasia is a huge continent, stretching far both east-west and north-south. America, on the other hand, is mostly north-south. And remember, climate zones most often change going from north to south, not east to west. So in Eurasia, a plant that grew well in a certain climate would be able to spread much more to the east and west, than a plant in America. Imagine a plant that loved rain, spreading from the Mediterranean southwards. How could it possibly cross the Sahara…? And then, the arid Sahel? And then, the savannas? The endless rainforests? Horrible! Wine grows very well around much of the Mediterranean, and also in South Africa. But… what are the odds of it spreading that far on its own…? The same is mostly true of the great mountain chains, impenetrable jungles, and scorching deserts, of America. When the great plains on central North America were cultivated with Eurasian crops, it literally change the course of history. But without the crops, that vast plain… was practically worthless.
And so, agriculture can only have developed in a few select regions of the world, and domestication of many animals likewise only in a few areas. These areas then enjoyed higher population densities, saw the rise of the first cities, writing and metallurgy, and a myriad of other developments, discoveries and inventions, all the while spreading civilisation slowly but surely around them, until within a few thousand years, the stretch from the Atlantic coast to Japan, had become the heart of mankind. In the lottery of the universe, areas like central America, the Middle-east, north-western India, and northern-central China, are the great winners. At least when it comes to “winning” civilisation first Until about 1900, almost all of mankind lived in these regions, this stretch. Africa, America and Australia, and most of northern Eurasia (Siberia), was a unremarkable and sparsely populated empty space. In many ways, it remains that way today. The great exception is Africa, which might go from 100 mn to 2000 mn in two centuries…
Sorry for this long story of mankind, but I hope I’ve at least enlightened some, inspired others, and irritated as few as possible. I’m sure such experts as @lotus253, @louis.mervoyer, @Sargon, or @Elfryc, might add much more helpful information.