Before the Agricultural Revolution, hunter-gatherers relied heavily on oral tradition on things like stars to guide them and tell them what time of year it was, what plants were safe to eat, good hunting grounds, good stories to share, that kind of thing. Their elders would be among the most knowledgeable, which is why we find a lot of evidence of Neolithic humans who have all sorts of bone issues and probably couldn't walk that seem to have been buried with their stretcher with a lot of dignity at a very old age. While it was definitely in people's self-interest to keep these people alive, there's also the fact it would have been their father or grandfather or what have you. I don't know much about pre-historic religion. I believe it was the Neanderthals who first seemed to practice ritual burial and show signs of religious thought. Religion probably started as animistic, trying to categorize events as diverse as fire, winter, death, and the Aurora Borealis.
Religion has a lot of cultural value, providing a sense of 'us' across a large number of people, providing some with the meaning in life they crave, a gathering point for the community and a vehicle for charity. However, I have always been somewhat confused by those who claim that a world without religion would fall into ruin. I won't go so far to say that the majority of humanity is 'moral', I think most people are too complicated and flawed to fit in there. But there's a lot of people who aren't complete jerks to one another, because they're busy worrying about themselves.
As a dark side-note to this talk of pre-historic humanity, I'm going to go off on one of my pet peeves. 
I've often heard the claim that, "No species kills its own except humanity," as a part of an anti-humanity diatribe. Well, the thing is, that's a load of tripe. Most species kill their own. Plenty of animal mothers devour some of their young to survive themselves.
Our own simian cousins wage war for territory in the jungle, complete with memorable warlords.http://news.discover...ar-behavior.htm
(Not mentioned here is that there was once a study of a particularly powerful chimp group. The scientists were bewildered at the size of this group's territory compared to its neighbors, and kidnapped its leader for study. The other chimpanzee troops invaded and slaughtered most of the powerful group, reducing to a bare handful and almost no territory. Horrified but fascinated, the scientists re-released the leader. He promptly took control of his tiny troop, and, through ingenious guerilla warfare and recruitment, reclaimed all of his territory and then some.)
And there's similar idealization of our hunter-gatherer roots, that we didn't have war or poverty or class distinctions.
Mongols were hunter-gatherer nomads.
Sarmatians.
Scythians.
Huns.
It's a brutal, tough life, and there's evidence we were committing genocide on our enemies before the Agricultural Revolution.
(It must be admitted that, the Mongols at least, did allow women to enter positions of power and treated them with more dignity, as it seems the rougher one's existence is, the less enthusiastic one is to oppress useful people.)