Somewhere, Marx suggests that religion stems from a projection of our collective powers onto a fictitious entity. Religious beliefs, he thought, emerge and thrive when we are unable to exercise those collective powers. Gregory Paul's research suggests that there may be some truth to this hypothesis. Over at Evolutionary Psychology:
As some nations become increasingly secular, one may wonder what role religious beliefs play for those living in technologically advanced societies. Advocates for religious systems often argue that these beliefs are instrumental in providing moral foundation necessary for a healthy, cohesive society – a view shared by Benjamin Franklin and Dostoyevsky.
In a follow up to his 2005 paper, Gregory Paul argues that high religiosity is not universal to human populations, and it is actually inversely related to a wide range of socio-economic indicators representing the health of modern democracies. Paul holds that once a nation's population becomes prosperous and secure, for example through economic security and universal health care, much of the population looses interest in seeking the aid and protection of supernatural entities. This effect appears to be so consistent that it may prevent nations from being highly religious while enjoying good internal socioeconomic conditions.
National level statistics suggest that strong mass religiosity is invariably associated with high levels of stress and anxiety, which are created by impoverishment, inequality, or economic security, related to high levels of societal dysfunction. These relationships are largely consistent when the United States, an outlier amongst advanced democracies in the high level of both religious belief and social decay, is removed from the comparison.
The belief held by some scholars that strong religious belief is the universal human condition deeply rooted in our psyches, may be false. Also contradicted is the hypothesis that evolutionary selective forces have played the leading role in determining the popularity of religion. Environmental conditions appear to exert great influence on the degree to which religious beliefs are held. The popularity of religious belief may be a reflection of a psychological mechanism for coping with the high levels of stress and anxiety resulting from adverse social and economic environments.
(The study, The Chronic Dependence of Popular Religiosity upon Dysfunctional Psychosociological Conditions, can be accessed here.)