A recent meta-analysis of 63 studies showed a significant negative association between intelligence and religiosity. The association was stronger for college students and the general population than for participants younger than college age; it was also stronger for religious beliefs than religious behavior. For college students and the general population, means of weighted and unweighted correlations between intelligence and the strength of religious beliefs ranged from −.20 to −.25 (mean r = −.24). Three possible interpretations were discussed. First, intelligent people are less likely to conform and, thus, are more likely to resist religious dogma. Second, intelligent people tend to adopt an analytic (as opposed to intuitive) thinking style, which has been shown to undermine religious beliefs. Third, several functions of religiosity, including compensatory control, self-regulation, self-enhancement, and secure attachment, are also conferred by intelligence. Intelligent people may therefore have less need for religious beliefs and practices.
A good discussion of the meta-analysis can be found here.