I thoroughly enjoyed "The Evolution of God" by Robert Wright. I recommend it to anyone interested in reading about the development of the three Abrahamic religions from the point of view of cultural evolution.
Rather than "reduce" religion to a byproduct of natural selection, the author suggests that its continual adjustment to the facts on the ground, its continual evolution, is a sign of its relevance - that it has historically been an important resource in mankind's gradual but steady trend towards alignment with a real, objective (transcendent?) morality. "Transcendent morality" meaning that there is a universal behavioral trend which gives more fitness to a culture. Anyone familiar with Wright's writing will know that his favorite term is "non-zero sum-ness", meaning that a culture, made up of individuals of course, which finds the most symbiosis, the most "non-zero sum" relationships, between its individual members and with other cultures tends to have greater fitness - a greater tendency towards self-preservation. Wright's idea is that this transcendent moral code MIGHT be evidence of some sort of design - and he is careful to specify design not as a competitor to natural selection, but rather as the source of natural selection. But Wright is no dogmatist on specific conclusions. He simply says that if one is inclined to believe in an underlying purpose to existence, then this moral code that man is continually discovering through cultural evolution (two steps forward, one step back) could be used to support that idea - if one is so inclined.
But it is a great book even if one is not inclined to make such leaps. His stories of the development of these religions are very insightful. While he describes different innovations in religious thought as the product of perceived self-benefit, he is also respectful of the religious impulse which is describes in the words of William James - "the belief that there is an unseen order, and that our supreme good lies in harmoniously adjusting ourselves thereto." A specific religious innovator (a Josiah, Paul or Mohammed) might be a true believer, not just a self-promoter. But the greater question is not "why did this thinker introduce this idea", but rather "why did this particular idea resonate within the cultural context of the time and become successful?"