Mano Singham over at Freethought Blogs asks "Do scientists get less religious as they get older?" Unfortunately, there's not much literature on the subject, as most scientists have better things to do with their time than talk about religion; they have jobs, after all, and those jobs aren't "religion". If only more preachers and bible salesmen had something useful they could be doing. Let me rephrase: If only preachers and bible salesmen were doing something useful, which they currently aren't.*
Still, studies have shown that scientists are irreligious, and that particularly eminent scientists (members of Britain's Royal Societies or the National Academy of Sciences in the US) are particularly irreligious. In the scientific community, eminence has the distinction of being earned over the course of a lifetime**. Thus members of those bodies are particularly steeped in science and particularly irreligious and particularly old. Unfortunately, two data points don't necessarily make a trend. However, the general consensus can be shown that the older a scientist gets, the less religious he gets (with a very few exceptions, such as NIH director Francis Collins).
The facts demonstrate that increasing education decreases religious belief, and science is particularly vulnerable to this defrocking effect, especially biology. Further, a career dedicated to scientific discovery will necessarily be one of increasing education; the pursuit of science is the pursuit of knowledge and continued research not only unveils universal human ignorance, but your own. However, I don't think that would have nearly so dramatic an effect as four years of college, nor a further four years of graduate school. Those are intense learning experiences, whereas post-graduate careers in science are ... careers. You're at work every day, gradually peeling away the universes petticoats, whereas college and grad school are more like a grand unveiling.
It's the difference between working your way through a library book by book and running through the natural history museum as soon as it opens (seriously; I love museums!).
I posit that there are two different factors at play here. The first is cultural. Science as a whole is pretty starkly liberal and antireligious; the community is fairly hostile to both. Now, I'm not saying that most scientists will get in your face and call you a fundy-idiot (this isn't Hollywood we're discussing, but real life). Rather, they'll be dismissive of your beliefs and make fun of you behind your back. Whereas I was pleasantly surprised to find myself entirely surrounded by atheists at the beach last summer (I knew my friends were all liberals, but atheists, too? Awesome!), I was incredibly surprised to learn that a colleague was a Pentecostal from a very conservative branch back in grad school; his parents and grandparents were fundamentalists who didn't believe in evolution. Even more surprising than my friend's revelation as Pentecostalist was learning that his father had a Ph.D. in physical chemistry as well! Fundamentalists with advanced degrees are rare, and even more rare too find that they're actually using their degrees for science (his dad was a working chemist). So I suspect that a major factor is that research scientists gradually weed out faith-heads, letting them get their little degrees, then sending them out to work for companies, bothering the universe for profit while letting the real scientists get on with the business of ferreting out truth for truth's sake.
The other factor I think is at work here is that these things take practice. As Dan Dennett said at Ted, "Every time you read it or say it, you make another copy in your brain." I haven't attended an Episcopalian service in fifteen years, but I can still sing the Doxology, and if I went tomorrow morning I would slip back into the liturgy no problem (It is meet and right so to do). I went back to Charleston for my high school reunion and so much of the area was absurdly familiar, despite having not been back since roughly the same time I last attended an Episcopalian worship service, but I still didn't know my way around and happily bought a map so I could try and see some familiar places. Point is, after years away from religious practices, and having spent those years in a community where religion isn't a regular topic, the habits of religious thought and genuflection go away. Old scientists have spent decades falling out of the Overton Window. What was once common and accepted has become foreign and stupid.
Oh, and finally, with age and eminence comes immunity. "I'm old, I'm famous; what're you gonna do to me?"
* Note entirely fair, I know. Studies have shown that religion comforts people whose lives suck, so bible salesmen are offering hot water bottles and preachers are hot water bottles, so their lives aren't entirely pointless. However, it would be a much better world if they did what they could to make the world more like, for example, Norway and Denmark, where life demonstrably doesn't suck and religiosity has demonstrably declined as a result. You don't need to turn to a mythical hot water bottle when you have an actual hot water bottle, and then all those preachers and salesmen could profitably get on with doing something more useful (ie. anything else that isn't actively murderous).
** One would like to believe the same is true for sports as well, being a field in which so much evidence is collected and dissected on a daily basis, but, alas, such is not always the case.