Genesis 1:3 Genesis 1:3And God said, Let there be light: and there was light.
American King James Version×tells us, "Then God said, 'Let there be light.'" If all the rest of the initial creation had to occur after this verse, then there would seem to have been nothing to produce this light (i.e., no sun). And we can't argue that the new light source was God, who is light (1 John 1:5 1 John 1:5This then is the message which we have heard of him, and declare to you, that God is light, and in him is no darkness at all.
American King James Version×), because He eternally existed before the introduction of the light described in verse 3. The account makes more sense when we realize that the earth and sun were both created at an earlier time, and that the earth later became a lifeless, ruined wasteland—its atmosphere choked with debris that prevented light from penetrating to the surface.
It's important to understand that of all the galaxies and planets God created, it is the earth that is the focus of God's greatest creative works, and therefore the events of the six-day account are described from the perspective of the earth itself, specifically from the vantage point of its surface (where all life-forms will be brought into existence). R.K. Harrison's Introduction to the Old Testament says: "In explaining this phenomenon it must first be noted that the standpoint of the first chapter of Genesis is an ideal geocentric one, as though the writer were actually upon the earth at that time and in a position to record the developing phases of created life as he experienced them. From such a standpoint the heavenly bodies would only become visible when the dense cloud-covering of the earth had dispersed to a large extent" (p. 554).
Verse 5 says, "God called the light Day, and the darkness He called Night. So the evening and the morning were the first day." Note that the cycle of day and night, or evening and morning, requires a rotating earth as well as an atmosphere allowing enough sunlight to come to the surface.
Through the next three days of the account, the process of renewing the earth continues. (It should be pointed out that these are literal, 24-hour days.) God next separates water on the earth's surface from water in the atmosphere, with a breathable expanse of air between the two (the second day). Next God separates the surface waters from land masses and causes flora to spring up from the land (the third day).
Now we come to the fourth day: "Then God said, 'Let there be lights in the firmament of the heavens to divide the day from the night'" (verse 14). On this day the atmosphere is further cleared so that from the observation point of the earth's surface, the sun, moon and stars are now clearly distinguishable in the sky. "Let there be" is not a statement of the initial creation, but a statement of appearance. This passage tells us that these celestial objects were allowed to be visible so that they could serve people as markers of signs, seasons, days and years.
Verse 16 then specifies that "God made two great lights." The Hebrew verb for "made" here (asah) could also be translated as"had made," denoting a previous action. Since the earth was already in existence prior to the first creation day, there is no reason to conclude that the celestial bodies were not also already in existence—since verse 1 states that in the beginning, God created both the heavens and the earth. However, the word asah also has the broader meaning of "set" or "appoint." This translation would not necessitate a previous action, for it appears that God set the sky in order on the fourth day and appointed the time keeping role already mentioned.
Now that the atmosphere was fresh and clean, with light and warmth coming to the earth, we next see God putting life on the restored planet—fish, birds, animals and human beings. The last thing God created was the Sabbath rest on the seventh day (Genesis 2:2-3 Genesis 2:2-3  And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.
 And God blessed the seventh day, and sanctified it: because that in it he had rested from all his work which God created and made.
American King James Version×).