The answer is found in Scripture and not inside of our limited minds with understanding based on how we see natural laws and relationships in play in the modern world. The Bible states that God Himself is light: “This is the message we have heard from him and declare to you: God is light; in Him there is no darkness at all” (1 John 1:5). Therefore, possibly God Himself was the light for the first three days of Creation. Something similar may also be in the case when God creates the new heavens and earth: “There will be no more night. They will not need the light of a lamp or the light of the sun, for the Lord God will give them light. And they will reign for ever and ever” (Revelation 22:5).