John Derbyshire has review of The Faith Instinct up. He hits the major points well. I should elaborate on something. In Darwin’s Cathedral David Sloan Wilson outlines two dimensions of religion, the horizontal and the vertical. The vertical is pretty straightforward, supernatural agents and forces. The cognition of religious ideas. The horizontal is the communitarian aspect of religion which sociologists such as Emile Durkheim focused on. That is, religion’s functional role in society. The two are somewhat related of course, but I think it’s a neat division which is useful.
I think the vertical aspect probably is a byproduct of cognitive biases we have. In other words, pleiotropy, whereby selection for agency detection, social intelligence, and innate theories of how the world works (folk biology and physics), generate intuitions which we bracket in the category “supernatural” as a response (this ranges from animism to astrology to theism). In contrast, I can see quite clearly how the horizontal aspect can foster group-level success, and so might be a target of selection. But, I don’t necessarily think that it is really religion as such which is the target of selection; instead, they are collective and communal impulses. They may be channeled in a religious manner, but clearly can manifest in other ways. This is why I think organized religion, which is hooked into the horizontal dimension, seems to be collapsing more than “spirituality” in many nations. Many of the intuitions which generate religious impulse are strongly biologically specified, so will persist even after indoctrination ceases. By contrast I suspect that the collective and ritualistic impulses can manifest in ways we perceive as secular. Of course, this last point might be a matter of semantics, as evident by the term “political religion”.