They do no such thing, though. More religious countries tend to be infested with crime, and they grievously neglect the poor.
I think the reasons for people being religious is simply as a reaction to helplessness, which is more likely in impoverished and politically unstable countries. I guess that's a chicken/egg sort of nitpick, but I really see it more as a consequence than as a cause.
The reason I'm not religious myself, though, is that, if I actually believed in any deity, you really wouldn't like the one that I picked, and the hymns would be discordant and creepy. I have a dark streak in my nature you wouldn't believe, and it is kept just barely contained by my devotion to rationalism. You really don't want to go there. When I am not laboring to keep these circuits cool, I get scary.