Most of the Bible translations I consulted record these words in Genesis 1:3: Let there be light. The Vulgate is less descriptive: dixitque Deus fiat lux et facta est lux. I translate it like this: "And God said, 'Light, be, and light was.'" It could be translated "Light exist" or "Light, become." It's like God addressed Light and called him to stand up and be counted.
Light came before the Sun was created. Perhaps light came from the mere presence of God. We are told that outer space is dark and light is only present when there is a sun or star to provide it. In the initiating stages of God's creation, we have no independent observers. The Word of God only gives us this introduction to creation. We have no science or wisdom beyond to explain or elaborate. Here we begin in faith to see God's creation. There is nothing before this to guide or educate.
God was before the beginning and He called the light to shine for us. God created by his Word. God said, and it was so.