There was an evolutionary advantage to "religion" (when viewed for what it is - a strictly human convention of relationships to each other and to the wider world in the form of stories, fables and morality tales that build ties between otherwise disparate groupings) which was essentially nothing more than "in-group reinforced, social hierarchy feedback".
Those who "go along to get along", in a strictly evolutionary sense, increased the survivability of their genes by strengthening their bonds to the social group that gave them protection from the elements and predators and other humans in the "out-groups".
As society continues to geometrically advance and change through inter-connectedness and technological advances, the older, more primal instincts and survival mechanisms begin to be less useful and as with anything else, as something becomes less useful or less of a survival aide, it becomes less favored by evolution.
In today's world, the evolutionary advantages of technology are outpacing those of social integration. Its at the heart of many of our most intractable conflicts. The old world - traditional religions, societal 'norms' for roles of women, patriarchial domination - is slowly (too slowly in my mind) dying off. I believe it is a mathematical certainty that 2 things will happen in the next century - 1) human population will sharply decline, something on the order of a 2/3rds or more reduction and 2) the remaining human population that comes through the trials of climate change, resource depletion and social upheaval will be those who abandon the primeval views and methods and adapt technology to only serve survival advantages (instead of bastardizing it for entertainment and vanity at every possible turn).
Those who decide "prayer" is the answer to a field that is fallow and non-productive without massive petroleum inputs - (instead of learning from the centuries of available experience in agriculture and leverage crop rotations, mixed field production and non-chemical methods of pest control and irrigation) - are going to find survival impossible. All the praying to an invisible, non-responsive mental creation in the world won't produce an excess bushel of corn or soy to survive the winter.
Reality has a funny way of imposing itself on people whether they "believe" in it or not.
I do not "believe" in science or technology or theories of evolution or abiogenesis...I accept them.
I likewise do not "believe" in gods...I reject the concept as being self-refuting and logically incoherent.
There is no conflict for me. Just pity for those who refuse to use the tools humanity has that separate it from the rest of the natural world - reason and abstract thought. Either one without the other is a hopeless existence, as is an imbalance of too much of one and not enough of the other.
Accepting an all-knowing, all-controlling, all-powerful (except when it comes to evil) deity is to surrender the things that make humans interesting at all...otherwise, we may as well just be viewed as well-armed, paranoid Savanah apes that have gone bald!