Jerry Coyne discusses an interesting article that suggests that religious faith in countries is positively correlated with insecurity, as measured by income inequality.
Another interesting article supports the idea that fear of death can lead to greater religious belief. This study does not strike me as very rigorous in how it was done but it is suggestive.

Some of you will be surprised that I will be among the select few, since I have been making the case for atheism and making fun of all religions, including Christianity, and thus would have seemed a sure bet for hell. It is time to reveal the truth. This was all a ruse on my part. I was deliberately trying to drive people away from Jesus because I was working as a double agent for the CIA (Christ Indoctrination Agency). Jesus wanted to weed out all those whose faith was weak enough that they could be swayed by atheist arguments. Jesus wanted only the truest of the true believers, those who are willing to completely abandon all evidence and reason and logic, and instead put their complete trust in the words in an old book of dubious origin and so he and