It's funny how alot of people say they don't believe in a god then when death comes knocking on their door they all of the sudden get mighty religious. Do I pray? of course....to think there is a God out there only makes sense. I look around at creation and think someone must have created all of this. To think we came from a chaotic explosion that created life beginning in goo to being hairy apes to being what we are today boggles the mind. It takes more faith to believe in that then to believing in a god.
See to me, evolution makes perfect sense. The idea that scientific processes of all kinds take place and have taken place forever, without any kind of rational reason or grand plan behind them just seems obvious to me.
When it comes to many of the major, organized religions' explanations of how life came to be... the false note to me is how human-centric most of those explanations are. If there is a "god"-like force out there, I find it hard to believe that the details of human behavior and existence would be the prime concern given the immensity of everything that must exist in the universe (much of which humans have no idea about given our very limited range of exploration).
It's probably fear. Fear of the unknown and/or total extinction and its comforting to hope that there's someplace else to go. There have been quite a few atheists though, who died atheists.
My feeling is that, as Del mentions here, a lot of religion and religious stories are about humans trying to assuage their fears of the unknown (and I think this cuts across all civilizations from the ancient Egyptians and Greeks to contemporary civilizations with current forms of religion). Voltaire once talked about the idea that if god didn't create humans then humans had to create god as a way of explaining the unknown to themselves.
I personally find a lot more comfort in philosophy than in religion. And, I think it's easier for me to be somewhat cynical about religion because my parents didn't raise me within any church, etc. We celebrate Christmas mostly as a social thing. My Dad was raised Episcopal and my Mom was raised Methodist, but religion hasn't really ever played a major role in my family. So, I often stand back and look at religion as an intellectual puzzle or a set of philosophical ideals that can be debated and discussed. I'm sure that this kind of thing might be harder for people who were raised with a strong religious upbringing.