Taken from an
anthropological perspective (as all inquiries into humanity should), religion is a set of explanations for the environment, human and animal activity, life, and death. Religions reflect the social, political, and environmental surroundings they are founded in, and are damn near always tossed out or amended when those qualities change. It would be impossible to date the first religious experiences of early man, but it probably existed in some form by the time
Homo erectus walked the Earth, or around 2 million years ago.
Religion, like
philosophy, is great at answering questions. Religion, unlike
science, works just as well (if not better) when there is little or no information on the subject. Religion is concerned primarily with
life and death, and other issues of major importance to humans. These things concerned primitive humans as much as they do modern humans. As soon as we grew intelligent and social enough to notice and care when others died, we began to wonder about the nature of death. From that, I presume, early humans started to wonder about the nature of life. What we would call "religion" arose as mythologies and rituals that were developed to explain
death,
life, and the natural world.
Significantly, those explanations reflected the environments they sprang up in. I'll avoid a lengthy tangent on the technological evolution ("complexity," as
anthropologists say) of societies. Suffice it to say, there are four or five stages a society can go through before they are what we would call "modern."
Hunter-gatherer is considered the most "primitive" stage, and is probably close to how the earliest humans lived. Hunter-gatherers live in small bands of 100 people or less. They do not have what we would call a government, although there are part-time leaders and elders who can arbitrate disputes or make group decisions (where next to migrate, etc.) The hunter-gathers get their food (obviously) from hunting and gathering. They do not practice agriculture in any capacity, instead relying on the bounty of the earth to provide for them. As a rule, these societies practice a type of religion known as
animism. It imbues every living thing with a spirit, and stresses respect for all things, living and dead. There is almost never a prime deity in control of the universe. There may be gods, there may be a Great Spirit, but it is not worshiped or seen as the focus of religious experiences.
Horticultural-pastoral is the next level of cultural complexity. At this point, the society has domesticated plants and animals, and lives in semi-permanent settlements. They have not discovered the plow, so their crop yields cannot account for the majority of their diet. They are more self reliant then the hunter-gatherers, although they are still at the mercy of weather, disease, and general misfortune. Settlements will typically not exceed several hundred to a thousand, with a cheifdom or council of elders. These cultures often practice elaborate burial ceremonies for their dead, and remember their dead ancestors. Horticultural-pastoral peoples tend to practice a form of
animism that includes the concept of
ghosts and the
spirits of their dead relatives. There is still no prime deity in control of the universe and all human experience.
Intensive agricultural societies can exist after the discovery of the
plow. Animals have already been domesticated, providing cheep labor, but without the plow crop yields are meager. After, food returns are so great people actually experience a food surplus. And with a food surplus the society can grow far, far larger. Cities and other permanent settlements develop. Societies can expand to around 10,000. There is a permanent, full-time class of priests and rulers. Suddenly,
polytheism blossoms. The key part of that being "
theism." When the society grows beyond 10,000, a
State is formed.
Monotheism is developed. There can be no singular creator deity responsible for all human events until there is a
State.
Clearly, religion evolves with the rest of society. It reflects the food source and social makeup --but mostly the government-- of the society. When you forage around the woods all day looking for roots and berries, or hunting bears and elephants, you tend to think in terms of plants and animals. When you live with many relatives for long periods of time, and they suddenly die, you wonder if they still have any effect on you. When you live by a ruling class of priests and governors, you think in terms of untouchable and all powerful gods who can smite you as easily as you kill a fly. When you live in a world of kings, emperors, presidents, generals, and the like, is it any wonder we assume the universe is governed by a single omnipotent entity who alone created you and everything else, and who alone must be worshiped and given sacrifices?
So what does this mean? Do leaders and priests manipulate religion to keep the masses in line? I doubt it. Religion and its social effects can only be understood with the quite modern trident of
sociology,
anthropology, and
psychology. Indeed, I would suspect the rulers and priests to have believed the local religions as much as the peasants. Instead, religion is a part of humanity. It is invented again and again around the world, not unlike language or art. We need religion to explain our world to us, to answer why we are here, why we die, and what happens to us when we die.
We can not be human without wondering about these things. We can not be human without trying to explain them.