There is a fine post up at DarwinCatholic discussing some of the issues raised by the materialist hypothesis that religious belief can be explained mechanistically in terms of selection forces. Darwin has articulated a very important point about such theses: they are instances of the genetic fallacy, the mistaken idea that by explaining the origins of some particular belief in terms of subjective interpretations of a complex and mysterious natural world we thereby disprove the objective truth of the belief. This is a very important point, since it vitiates every such materialist argument.
The materialist view is that religious belief is not what philosophers call an "inference to the best explanation", that is, it posits entities (such as God) that are unnecessary if we can explain the observable kosmos in terms of naturalistic entities and forces (matter and natural selection). This is a valuable strategy to use in scientific explanations, but it is important to remember that it is merely a strategy--that is, it carries no guarantee of truth. All the scientific evidence in the universe could suggest that there is no God, and there might still be one. It may, in fact, be "irrational" in a materialist sense to believe in God, and yet still a good idea, because still true. This is yet one more reason why it is better to be an anti-realist rather than a realist about scientific explanation.