Gods and goddesses were associated with nature, and certain natural phenomenons that ancient cultures could not explain, so they said that it was the form of gods. All throughout history, you read about Greek Mythology, and how each of the main gods represented a part of nature. Zeus was lightning/thunder, Poseidon was the seas. In Hinduism, they have a god for the sun, among others. Even in North America, natives believed that they had to do sacrifices for the gods, and if they failed then they'd be cursed with years of no rain and bad crops.
So in summary, gods have been associated with nature.