That is a good question. Here is an interesting question to ask yourself. Did men, roughtly 6000 years ago, understand that the sun was where light came from? I know you have to guess, but isn’t it a pretty good guess? So, obviously what I’m going for here is if men wrote the Bible why and how on earth did they ever decide to put light on day one of Creation Week, and the creation of the sun on day four? That would be pretty strange for these “more” primitive people to make a creation story so abstract. Wouldn’t it? It’s counter-intuitive.
The reason for the sun coming later is most likely that God is indicating that true light comes from him, and that the sun is nothing to worship. You will find that there is always a symbol to God’s working.
Anyway, the way I perceive it is that the earth is rotating before God as he is working on it, and God is for the first three days the source of any light in the universe. All that needs to be in effect for an evening and a day on earth to occur is rotation. Since, the earth is rotating now, and God had created it by then, it is not a leap of logic to assume an evening and day effect were in effect and that God had begun using it as the convention that we observe now.





