How do the river valley civilizations influence rise of classical empires?
On the most basic level, the ancient river valley civilizations influenced classical empires because they influenced civilization, period. The river valley civilizations are the most lasting and historically attested instance of the greater phenomenon of humans moving from a nomadic lifestyle based on hunting and herding to a sedentary one based on agriculture. In a sense, history begins with sedentary civilizations: they were the first to have written records, and they represent the point where humans start making large, lasting impacts on the environment, creating a continuous archaeological record.
To get more specific, historians generally recognize four major "river valley civilizations": the Huang He civilization in modern China, the Indus civilization in modern India and Pakistan, the Nile civilization in Egypt, and the Tigris-Euphrates civilization in modern Iraq (see reference). Three of the four have direct descendant cultures that persisted for thousands of years. The bureaucratic federal system of China, which certainly persisted throughout China's imperial period and arguably continues into the modern age, has its roots in the irrigation systems of the Huang He culture. The Nile settlements grew into the Egypt of the Pharaohs, which endured in one form or another until the Roman conquest three thousand years later. The Tigris-Euphrates societies, collectively referred to as Mesopotamia, gave life to the Sumerian, Akkadian and Babylonian Empires that dominated much of ancient West Asia. Alone of the four, the history of the Indus Valley civilization, called Harappa, is largely unknown, having only been rediscovered in the 1920s. Harappa aside, culture and politics born in all three of the others are major, known influences on societies that thrived millennia after their founding.
To get as specific as possible, even in the narrowest possible sense the classical civilizations of Greece and Rome took concrete influence from the river valley cultures. To start with the obvious, Rome was a river valley culture, based around the Tiber. It was just a late bloomer. But even limiting the question to the four traditional cultures, both Greece and Rome were powerfully affected by the older river valley civilizations.
Egypt in particular was vital to the classical world. In Greece, Egyptian influence was so prominent that it became commonplace to worship the chief deity of both cultures as a single being: Zeus-Ammon. The influence was sufficient that even after conquering Egypt, Alexander the Great identified himself with Zeus-Ammon to consolidate his power. In Rome, worship of ancient Egyptian deities like Isis often eclipsed the worship of Roman ones and persisted well into the Christian period, with some historians identifying the classic Christian image of Mary with the infant Jesus with the ancient figure of Isis suckling the infant god Horus.
Mesopotamia also had substantial influence on Greece and Rome, primarily through Persia. The Persian Empire encompassed Mesopotamian societies including Assyria, Babylon, and Sumeria, and many customs and much of the culture of imperial Persia has Mesopotamian roots. Persian interaction with Greece is largely portrayed by history as adversarial, and that's not incorrect, but like so many warring societies, each exerted a strong influence on the culture of the other, including clothing, culture, and language. The two cultures were so intertwined that Themistocles, Greek hero of the Persian War, finished his life as a regional governor in the service of the Persian king Artaxerxes II.
In short, in addition to being the earliest examples of what modern people think of as civilization and to being powerful societies that existed for thousands of years and exerted influence for thousands more, the ancient river valley cultures, particularly Mesopotamia and ancient Egypt, were vital in the formation of what we think of as classical Greece and Rome.
All of the "classical empires" began as river civilizations. From the beggining of time, mankind roamed about looking for food as a group of small hunter gatherer societies. That said, with the coming of the agricultural revolution, man began to settle in places that had the best, most fertile soil... this of course being around the river valleys such as the Indus in ancient India, the Tigris and Euphrates in ancient Mesopotamia (today the area of Iraq) and probably the best example of the Nile in ancient Egypt. In short, all of these civilizations grew into the empires that you're speaking of because they had the necessary component to life, water. In the case of Rome and Greece, farming around rivers like the Tiber became grand enough for the civilizations to begin moving out and conquering more and more territory. The same can be said for the ancient empires in China and India as well.
What we think of as Classical Empires, whether Indian, Greco-Roman, Chinese or Persian, all initially started as agricultural settlements near rivers. Some examples are the Indus River in Ancient India, the Nile in Ancient Egypt, and both the Tigris and Euphrates in Ancient Mesopotamia.
Rivers served as water sources that also provided access to both game and aquatic life for food as well as rich soil in which to grow crops. Rivers could also offer defense; if a settlement happened to be located at a bend in the river, any potential enemies could be seen coming from a single direction. People could travel along rivers by boat to other settlements to trade goods and supplies.
The abundance of resources in a river valley allowed the populations of these settlements to expand, first into villages, then townships and finally, into city-states with an elected government body, a division and specialization of the labor force and a standing army to protect the city-state’s assets. A standing army was also used to subdue neighboring territories and bring them under control of the attacking city-state which eventually grew into an empire.