Those who wrote Genesis apparently didn't understand how planets formed, how solar systems formed or that a nebula is an astronomically large cloud of dust and gas.Have you considered how solar systems are formed...gases and particles and nebula. A nebula does glow, so in that sense there is light. Even once the sun and planets are formed there are generally clouds that can come between the two. Was there enough light coming from the sun to penetrate the clouds that may still have been covering the earth to bring forth plant life? In fact, can emerging plant life thrive without such protection from the sun?
Merely something to think about, because if those who wrote Genesis had this in mind, our ancient ancestors (as I suspect) were a great deal more intelligent than we credit them.
It's a bit of a stretch to suggest that those who wrote about talking snakes and eternal punishment for fruit theft had any understanding of general relativity and space-time.