There’s a belief that religious people have higher self-esteem than folks who are not religious and according to a recent study this is absolutely true some of the time but not for the reasons folks might think. A recent study found that religious persons living in a country that is predominately religious have much higher self-esteem than those in that area who are not religious. However, religious persons living in countries where the national identity is not particularly religious tend to have lower self-esteem.
Essentially, it is NOT being religious in and of itself that affects the self-esteem but rather it is having a sense of belonging to a group. My students in social influence will recognize Maslow’s hierarchy at work here.
See http://www.huffingtonpost.com/2012/01/20/religion-happiness_n_1219295.html for a bit more.