Religion is a byproduct of evolution - wishful thinking, agency detection, or group cohesion.
Pascal Boyer, Scott Atran, and Justin Barrett have built a serious cognitive science of religion. Humans have a hyperactive agency-detection device (HADD): rustling in the grass is better interpreted as a predator than as wind, so we over-attribute agency and invent invisible agents. We have theory-of-mind modules that work on absent persons as easily as present ones - hence ancestors, spirits, gods. Religion confers group-cohesion benefits, so religious groups outcompete non-religious ones. Put these together and you have an adequate naturalistic explanation of religion - no gods required. Evolution invented God, not the other way around.
The argument is self-defeating and explanatorily incomplete. (1) Self-defeat (Plantinga's Evolutionary Argument Against Naturalism, 1993, refined in Where the Conflict Really Lies): if naturalistic evolution gave us all our belief-forming faculties, and evolution selects for survival, not truth, then all our beliefs are the products of truth-indifferent processes - including the belief that naturalistic evolution is true. The argument saws through its own branch. (2) Genetic fallacy: even if religion has evolutionary roots, that says nothing about the truth of its claims. If God wanted humans to be able to recognize him, giving them cognitive machinery for doing so would be exactly what we would expect. "Human beings have brains built to detect God" is as compatible with theism as with atheism. (3) The HADD story predicts vague animism, not specific, historical, propositional religion with creeds, canons, philosophical arguments, and martyrs. Christianity's specific claims (a crucified man raised bodily at a dateable moment in a specific city) are exactly not what agency-detection misfires would produce. (4) Empirically: religious belief correlates not with superstition and credulity but with measurable mental health, pro-sociality, and (in multiple large-scale studies) well-being; Barrett himself (a committed Christian) argues the data are best explained by humans being "born believers" in the sense that we are built to perceive transcendence. That is what you would expect if God made us. (5) Many leading philosophers and scientists have argued naturalism cannot account for consciousness, rationality, objective morality, or the intelligibility of the universe - each a prerequisite for even making the argument. If naturalism is true, we have no warrant to trust our belief that naturalism is true.
Cognitive science of religion is an interesting empirical project and does not settle the metaphysical question. Explaining how we come to believe does not disprove the belief - just as explaining how we come to believe the external world exists does not disprove the external world.
Sources & citations
- Where the Conflict Really Lies — Alvin Plantinga (2011)scholarlyFind on Amazon
- Warranted Christian Belief — Alvin Plantinga (2000)scholarlyFind on Amazon
- Reasonable Faith — William Lane Craig (2008 (3rd ed.))scholarlyFind on Amazon