Is religion genetic or social? Hmm...
Earthquakes, floods, lightning, the stars, the sun...all of these things that were mysterious to us, needed to be attributed to something. And logically speaking, with no knowledge of the universe, it wasn't a bad call to think that a Greater Power was responsible for it all.
So I guess our belief in a higher power is a mechanism for us to cope with things we can't understand. Actually, if you think about, the notion of "god" has been replaced in modern times, at least in some part, by the notion of extraterrestrial life. There are small groups of people who actually believe strange lights they see in the sky to be UFOs from outer space!
That boils down to "I can't explain it, therefore it must be greater than me." I mean, when is the last time you heard a Believer claim that the peoples of Planet X were anything less than thousands of years more advanced than us? It always comes back to the idea that something out there is much more powerful, and much greater than we are. Be it God, Allah, the secret governments, Space Aliens, or whatever.
So I guess it's basically the result of our ability to think in abstractly, coupled with our ability to reason, that creates this need for a higher power.
Of course, the reason the religions of thousands of years ago are still thriving today is because they are based on fear, and fantastic promises. If they did not offer both reward and punishment, there would be no followers. I think the evidence that not one of them is true is that there have been so many forms of religion, all believing in different things. That in itself says that the belief in a god or gods is nothing more than a byproduct of being an intelligent being.
I'd love to see what would happen if we could raise a group of infants to adulthood in a bubble. I'd love to see what they would believe, what their religious structure would be, if there was one at all. That would prove this once and for all.