Genesis 1 shows that a form of light permeated creation from the first day even before the sun was created. The sun, moon, and stars were given their purposes on day four (Genesis 1:14-19), serving as ongoing markers for humanity rather than the initial source of light.
While we can't be certain of the initial light source, many possibilities have been proposed. One possibility is that the light on the first three days was a temporary protosun (i.e., protostar). A second explanation is that the light on the first day (Genesis 1:3) was a direct act of divine creation, with God Himself as the source. God does not need the sun, moon, and stars to provide light (Revelation 21:23). A third possibility is that the nearest star, our sun, was created on day one along with the other stars and celestial bodies ("the heavens" of Genesis 1:1). But these light sources were not yet visible to an observer on earth, due to the initial cloud cover. The "making" of the sun on day four refers to its functional appearance and role in the earth's environment, not its physical creation, which took place on day one with the other stars.
Like a pebble on a lake, a conflict has wider reverberations than just the two opponents. Eventually, most observers pick a side. This can happen with with conflicting ideas, too. When science and faith appear to be in conflict, leaving us unsure what to believe, we should trust the Bible and wait for further light on the details. We should also not expect Scripture to do what it was not meant to do. For the ancient Hebrews reading Genesis, the most important truth revealed was the fact of creation by God and understanding our role in His orderly design. The emphasis of the author was not to provide us with scientific or exhaustive explanations as to how the different aspects of our universe work.
We may not understand all the details behind creation, but we know that God is the Author of all. We can trust that He has revealed Himself through creation, His Word, and His Son. And because we know Him, we have faith that we will one day spend eternity with Him. Until then, we can use science to help us understand what He has done, leading us to awe and worship of our Creator, who spoke all things into existence with purpose and order.
As we hold Scripture as our ultimate authority, we can patiently explore the created world with humility, trusting that all truth ultimately points back to Him. In doing so, our study of creation becomes not a source of doubt but an invitation to worship the Creator who is both beyond our full comprehension and intimately known through Christ.