Light can come from other sources. Turn on the light switch- fireflies – etc. God’s light – HIs Shekinah Glory is perfect light. Keep in mind that he created the sun to rule the day and the moon to rule the night. This was already a pre-determined pattern of dark and light that God placed the sun and moon into. He was the first light of the world (and still is! – John 8:12)
The very fact that the Sun was not our first light gives us a “proof” that God wrote that part of the Bible, not man. Since many of the other cultures worshiped the sun “God,” the sun would have been the first thing they would have recorded and not left to day 4.