Before God created the sun to give light to the earth, He provided a light source for the first three days. Where would the original light have come from? The Bible tells us that God is light (1 John 1:5; Rev. 22:5), and that in the new heavens and earth there will be no need for the sun or moon, “for the glory of God illuminated it” (Rev. 21:23). Some pagan religions worship the sun, and even evolutionary theory credits the sun for the creation of life. Knowing that man is prone to worship anything but the Creator, perhaps God did it this way specifically to show that He, not the sun, is responsible for the origin of life (see Deut. 4:19; Ezek. 8:16).
Genesis 1:18 and to rule over the day and over the night, and to divide the light from the darkness. And God saw that it was good.