NPR explores the possible evolutionary advantage of believing in God:
For decades, the intellectual descendants of Darwin have pored over ancient bones and bits of fossils, trying to piece together how fish evolved into man, theorizing about the evolutionary advantage conferred by each physical change. And over the past 10 years, a small group of academics have begun to look at religion in the same way: they've started to look at God and the supernatural through the lens of evolution.
In the history of the world, every culture in every location at every point in time has developed some supernatural belief system. And when a human behavior is so universal, scientists often argue that it must be an evolutionary adaptation along the lines of standing upright. That is, something so helpful that the people who had it thrived, and the people who didn't slowly died out until we were all left with the trait. But what could be the evolutionary advantage of believing in God?
h/t to Lisa Fox