"When life is tough or when it's uncertain, people believe in big gods," Russell Gray of the University of Auckland's School of Psychology said in a statement.
"Pro-social behaviour maybe helps people do well in harsh or unpredictable environments."
The study indicated that societies with less access to food and water were more likely to believe in moralising high gods, Xinhua reported.
In addition, the researchers found a strong correlation between belief in high gods who enforced a moral code and other societal characteristics.
Political complexity -- a social hierarchy beyond the local community -- and the practice of animal husbandry were also both strongly associated with a belief in moralising gods.
"Previous studies have pointed to religion being a force for building strong social groups, but there has, until now, been no systematic global test of the social bonding hypothesis," Joseph Bulbulia of Victoria University said in the statement.
The study used historical, social and ecological data for 583 societies and data from the Ethnographic Atlas, an electronic database of more than 1,000 societies from the 20th Century, for geographic coordinates and sociological data including the presence of religious beliefs, agriculture and animal husbandry.