When the earth was made God saw that it was good. He sent Lucifer, the arch angel, down to earth with a third of the angels to beautify and landscape it. It was one big garden.
Lucifer got jealous of the Lord God and turned the angels against him and declared war on him in heaven. Lucifer has only the power which God had given him. Not knowing the real power of the Lord God he had no chance of winning, and so was cast down to earth. Whilst there he polluted and disorientated the running order of nature where the earth was shaken by disasters by the heavens and by nature itself.
God saw all of this before the universe was made and knew that Lucifer would fall from grace.