According to Dominic Johnson:
Reward and punishment may not emanate from a single omnipotent deity, as imagined in Western societies. Justice may be dispensed by a vast unseen army of gods, angels, demons and ghosts, or else by an impersonal cosmic process that rewards good deeds and punishes wrongdoing, as in the Hindu and Buddhist conception of karma. But some kind of moral order beyond any human agency seems to be demanded by the human mind, and this sense that our actions are overseen and judged from beyond the natural world serves a definite evolutionary role. Belief in supernatural reward and punishment promotes social co-operation in a way nothing else can match. The belief that we live under some kind of supernatural guidance is not a relic of superstition that might some day be left behind but an evolutionary adaptation that goes with being human.
It’s a conclusion that is anathema to the current generation of atheists – Richard Dawkins, Daniel Dennett, Sam Harris and others – for whom religion is a poisonous concoction of lies and delusion. These “new atheists” are simple souls. In their view, which derives from rationalist philosophy and not from evolutionary theory, the human mind is a faculty that seeks an accurate representation of the world. This leaves them with something of a problem. Why are most human beings, everywhere and at all times, so wedded to some version of religion? It can only be that their minds have been deformed by malignant priests and devilish power elites. Atheists have always been drawn to demonology of this kind; otherwise, they cannot account for the persistence of the beliefs they denounce as poisonously irrational. The inveterate human inclination to religion is, in effect, the atheist problem of evil.
But what if belief in the supernatural is natural for human beings? For anyone who takes the idea of evolution seriously, religions are not intellectual errors, but adaptations to the experience of living in an uncertain and hazardous world. What is needed – and still largely lacking – is a perspective in which religion is understood as an inexhaustibly complex variety of beliefs and practices that have evolved to meet enduring human needs.
I agree that this process is hardwired — although I hold that the source comes from a different direction:
Romans 1:18–25 (ESV)
18 For the wrath of God is revealed from heaven against all ungodliness and unrighteousness of men, who by their unrighteousness suppress the truth. 19 For what can be known about God is plain to them, because God has shown it to them. 20 For his invisible attributes, namely, his eternal power and divine nature, have been clearly perceived, ever since the creation of the world, in the things that have been made. So they are without excuse. 21 For although they knew God, they did not honor him as God or give thanks to him, but they became futile in their thinking, and their foolish hearts were darkened. 22 Claiming to be wise, they became fools, 23 and exchanged the glory of the immortal God for images resembling mortal man and birds and animals and creeping things.
24 Therefore God gave them up in the lusts of their hearts to impurity, to the dishonoring of their bodies among themselves, 25 because they exchanged the truth about God for a lie and worshiped and served the creature rather than the Creator, who is blessed forever! Amen.