Religion and Evolution are typically at odds with each other.
One is a social construct.
The other is science.
One is a social construct.
The other is science.
Are we evolved to have religion? Maybe, but the answer to that has absolutely nothing to do with the question of whether or not evolution itself is true.
Religion doesn't have anything unique to create community and bonding, other than large numbers. It's not any better at fostering that things over any other shared interest, and at it's worst causes significantly more damage to communities.
What is another shared interest that builds positive community bonds at or above the scale of religion.
Procreation.
What religion at scale hasn't also done significant damage to communities.