Before the mountains were brought forth
or ever you had formed the earth and the world,
from everlasting to everlasting
you are God.
Psalm 90:2 ESV
The Psalmist eloquently places before us the pre-existence of God.
It is comforting, even though it is unimaginable, to know that God has always been. He was not created, nor did he suddenly appear out of nowhere to start creating his masterpiece.
The scripture above is clear, God has existed from everlasting past into everlasting future.
When Moses asked God on what basis, and upon whose authority, he would lead Israel out of bondage and to a promised land, God's response was to say simply, "I AM."
God's pre-existence as well as his post-human existence is the basis upon which his supreme authority is determined. Not only will he be the ultimate Judge at the conclusion of our earthly existence, as we are often reminded in sermons and in scriptures, he is also the one who predetermined the creation of the earth and all its inhabitants. He is sovereign.
It is wrong-headed to think that God is engaged in some cosmic struggle for power against evil or any personification of evil in the form of a devil, or Satan. To think of this as struggle is to entertain at least two possible errors: one, that God's sovereignty is compromised by the presence of evil; two, that the one who personifies evil (Satan, "the devil," etc.) possesses a measure of sovereign power which rivals the sovereignty of God.
Neither of these errors should be allowed a foothold in our understanding of God and creation; however, to some degree, many Christians mistakenly conform to these, in part, because the concept of sovereignty is so radical that it is difficult for many Christians to acknowledge.
It is made even more difficult when churches and Christian authors engage in existential philosophies and seek to blend cultural tenets into the Christian faith in order to help God make more sense to humanity, as if our helping God in this way makes more sense than did the incarnation of Jesus Christ in whom God disclosed himself more fully to us.
If anything is true about God at all, it is that nothing exists in creation that is not subject to his creative and governing authority.
While it still does not make it easy for us to understand why evil exists, or why bad things happen to seemingly good people, nor why those who are evil and faithless prosper, it does in fact increase the Christian's confidence in God simply by knowing that he is the Author and Finisher and that, ultimately, those who have faith in him will someday join him in the final conclusion to live out eternity under his authority and love.