I will take a stab at your question. Without civilization humans would essentially live in the jungle where actions will be decided on the basis of sheer power and naked whim and desire. Humans over the centuries used religion as part of civil society not just for the creation of deities but more importantly as a basis on which to create moral codes on how to live so that people can live together peacefully and harmoniously. The same ideas on how to live would exist with or wirhout religion but the religion provides a sense of authority behind the code. As societies evolved they took these ideas from religious codes and evolved them further into secular laws with the power of government behind them as the source of authority. For Judeo-Christians you can start for example with the Ten Commandments. Modern society can be argued to have evolved "beyond religion" as far as the state is concerned but still for many there is at least a partial religious element to their value system.