Positive emotions broaden our awareness and encourage novel, varied, and exploratory thoughts and actions. Over time, this broadened behavioral repertoire builds skills and resources.
People believe in God because the world is very complicated and they think it is very unlikely that anything as complicated as a flying squirrel or the human eye or a brain could happen by chance.