The Economist this week did a story about a new scientific research project called "Explaining Religion", which seeks to understand why religion is so ubiquitous among human societies. The article goes on to discuss how they are giving brain scans to pious and non-pious people, and analyzing various neurotransmitters and the role they may be playing.
I think it may be simpler than that.
Suppose that human beings are animals, created by evolution. It is clear that a nervous system as complex as a human's is capable of having detailed instructions programmed into it. Many species of cattle, possessing slightly simpler nervous systems, are able to stand up and walk, without training, within minutes of birth.
After a human being is born, it is trying to make some sense of the world. The faster it can do this, the less of a burden it will be to its parents, the sooner they can resume breeding, the sooner the individual can reach adulthood and being breeding itself. So having babies born with instincts that help them figure out the world would be a beneficial evolutionary trait.
One assumption that a baby could make is that the chaos surrounding it is controlled by an all-powerful, benevolent (or sometimes not-so benevolent) being, in many ways like the baby itself. If the baby makes this assumption and tries to establish a rapport with this benevolent being, it will sooner learn to communicate with its parent, a very constructive step. If humans are genetically programmed with this instinct, couldn't it reverberate through adulthood in efforts to establish contact with a cosmic almighty? Or, for that matter, in the popularity of conspiracy theories, the determination of so many college students in idle, unresearched bull-sessions to believe that everything that happens in political or economic spheres is determined by a small group in a smoke-filled room somewhere?