Why river valleys? Rivers provide a lot of important things: drinking water, good hunting and fishing, boat transportation for trade. But while all these are important, the most significant reason for why civilization first developed in river valleys was their agricultural productivity.
The start of complex civilization was dependent on a large population. The innovations and achievements of the first civilizations could only be made by tens of thousands of people living and working together. And a large population could only develop if the place where they lived could produce enough food to feed them.
Rivers provided two key things to improve agriculture productivity. The first is adequate water. Rivers provided a dependable source of water for agriculture, especially in the arid climates of Egypt and Mesopotamia that received little rainfall. But just as important as water is that the soil has the proper nutrients. The Yellow River in northern China, the Tigris and Euphrates rivers in Mesopotamia, the Indus River India, and the lower Nile in Egypt all flood regularly. These floods enriched the soils of the surrounding land with minerals washed down from the upper elevations, greatly increasing the ability of the river valley's farmland to produce food.
The immense productivity of these river valleys not only provided the food to support a large population, it also meant more food could be produced with less workers. This freed people from doing things besides just producing food, and allowed them to specialize in new professions or crafts. This specialization was critical for civilization. Great achievements and innovations, such as building monumental buildings or developing new inventions like bronze and writing, could only happen when artists, craftsmen, government officials, priests, scribes and other workers were free to dedicate their time and labor to skills and careers besides farming.
Nile River and Nile Delta from space.
One Ancient Greek writer once famously said,
"Egypt is the gift of the Nile