God controlled morning and evening by this mysterious celestial force called "light"
that He switches on and off?
Before He created the Sun?
Writer wasn't aware that light was caused by the sun!
Given his limited understanding of the world, there was no reason for this writer to conclude
that the sun had anything to do with creating the illumination.
And, the earth being flat in his worldview, it's understandable that he would misunderstand
the lumination of sunrise and sunset, where there is "light" before and after the sun is visible.
Hey, how about explaining it by just saying God created light.