Since it just came up recently, I thought I'd hunt down some figures comparing the religious beliefs of scientists and the general public in the US.
A 2004 BBC poll showed the number of people in the US who don't believe in a god to be about 10%. A 2005 Gallup poll showed that a smaller 5% of the US population believed that a god didn't exist. The 2001 ARIS report found that while 29.5 million U.S. Americans (14.1%) describe themselves as "without religion", only 902,000 (0.4%) positively claim to be atheist, with another 991,000 (0.5%) professing agnosticism.
Quite a bit of variability there, suggesting that the way in which the questions are asked probably influences the answers.
As for scientists in the US, again from Wikipedia
According to a 1996 survey, belief in a god that is "in intellectual and affective communication with humankind" and belief in "personal immortality" are most popular among mathematicians and least popular among biologists. In total, about 60% of scientists in the United States expressed disbelief or doubt in such a god. This compared with 58% in 1914 and 67% in 1933. Among leading scientists defined as members of the National Academy of Sciences, 72.2% expressed disbelief and 93% - disbelief or doubt in the existence of a personal god in 1998.
A survey conducted between 2005 and 2007 by Elaine Ecklund of University at Buffalo, The State University of New York and funded by the Templeton Foundation found that over 60% of natural and social science professors are atheist or agnostic. When asked whether they believed in God, nearly 34% answered "I do not believe in God" and about 30% answering "I do not know if there is a God and there is no way to find out."
And from a story
about that latter survey mentioned above:
Almost 52 percent of scientists surveyed identified themselves as having no current religious affiliation compared with only 14 percent of the general population.
And while nearly 14 percent of the U.S. population who responded to the GSS describe themselves as "evangelical" or "fundamentalist," less than 2 percent of the RAAS population identifies with either label.
So even with the variability, there seems to be a strong correlation between being a scientist and being non-religious. But is there a causal relationship? That last study concluded that people going into the sciences tend to be self-selecting, so that rather than people going into science and losing their religion, non-religious people tend to gravitate toward science.
I also found it interesting that mathematicians tended to be the most religious, while biologists were the least.