Well, I promised my self I would not discuss religion on this site, as when you do discuss religion it normally spirals and escalates until that is all that is talked about. But I feel I can give a good and informative answer to this, so here goes…
I will start off with personal opinion, I personally think that for the most part it’s genetic. You are either born with a full religious inclination, a partial one, or none at all. This predisposition then comes in to contact with learned behaviors and thus leading to different beliefs or lack thereof. A person with a partial religious inclination that never comes in contact with religion would probably turn out to be an agnostic, while the same level of inclination in someone who does come in to contact with religion could lead to deism or moderate theology. Someone with a heavy predisposition will probably seek out this kind of information, leading to full blown fundamentalist theology or possibly a cult mentality.
On top of this, I think we have many other contributing factors to take in to consideration. For example the human need to know and have absolute certainty. For the most part humans have a very hard time admitting that they do not know something, or that they are wrong, or that they have been caught out in a lie or deception.
The fear of death could be another contributing factor, as well as the sun and tribal superstitions. For other people it is the desire to acquire knowledge, and while some would argue that theism is not actually a form of knowledge rather an act of faith, they perceive their scripture studies as beneficial to their knowledge.
For some people it may be that they where born in to a religious family and simply have never had a reason to question their faith, rather like the atheist who has never come in contact with religion and thus never actually questioned their disbelief.
To some people it is simply self evident that there is a god, how could evolution lead to something as complex as a human spine, how could gravity just happen to make spherical planets and orbits and everything else that we see. They see reality as if there is an objective self evident design that could only come from and intelligent source, while others say that it is self evident that there is no god because there is obviously no design of any kind, that same spine that was proof of a design for one person is seen as a vulnerable thin piece of bone and nerve endings that could brake and leave you crippled for life. How could anything that unreliable have any kind of design.
Some people will say that god is a logical paradox, that there simply can not be a god that is both omnipotent and omniscient, others will say that nothing can come from nothing and the only way for all of this is if there where a god. Some say that a building is proof of a builder, and that a painting is proof that there was a painter, while others will say that a wild flower is not proof of a gardener.
For some people it is a moral issue, killing must be wrong because it is wrong in the eyes of god, if there where no god there would be no ultimate authority on what is good and bad. Other people would respond that even if there is a god, morality would still be that gods subjective opinion, and that might does not make right.
If you look in to some religions, you will see that ancient cultures used to believe in god because they could see that god every single day with their own two eyes. They used to look at the sun and believe that it is a god, their lack of understanding leading them to conclude that there must be a god because they could see it.
Some people claim to have scientific proof that their religion is the true one. Some fundamentalist Christians will claim that the bible has information in it that humans could not have possessed 2000 years ago. Such as that the earth is hung on nothing. While another more moderate christian will claim that is simply referring to the rotation of the stars at night that gives the effect of there being a central point. While Muslims will claim that their religion must be true for the same reasons, that it has information that could not have been possessed so long ago, such as that meteorites have iron in them. Some will point to passages in the Qur’an that say that god tore the heavens asunder and claim that it is talking about the big bang.
As for what studies show, religion is mostly thought to be a learned behavior. Something that is inherited and passed down from one generation to the next. The evidence to support this claim is normally given in the form of an observation, that most countries and nationalities tend to have their own different beliefs.
I think the main thing to remember here is this… religious people are just as baffled by atheists as atheists are baffled by religious people. Both sides are self evidently wrong to the other side to such a degree that atheists claim religious people secretly know its all nonsense while religious people claim atheists secretly believe in a god. The level of misunderstanding is so high, and the consequences to this kind of debate so great, that we should all remember this and try to do our best to get along until some solid evidence of some kind is given one way or another.