God created light on the first day.
Genesis 1:2-5 And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters. 3 And God said, Let there be light: and there was light. 4 And God saw the light, that it was good: and God divided the light from the darkness. 5 And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.
God created the basic physical existence of the universe in Genesis 1:1. Now He sets His focus on the Earth.
First, although created, it was not completed. That’s why it was formless and void, meaning incomplete and empty.
Second, the Godhead was involved in creation. In Genesis 1:2, we see God the Father and the Holy Spirit’s involvement. Colossians 1:16 tells us that Jesus Christ is the Creator. So all three members of the Trinity participated and are collectively the Creator.
Third, God created light. Genesis 1:3-4 is incredibly important. God speaks and light comes into existence. Scientists still have trouble describing what light is. It has aspects both of a particle and a wave. Einstein described its fundamental relationship to energy and matter in his equation E=mc2. Light has a special place in macro-physics governing large objects and in quantum theory governing atomic particles. Of all that God created, light holds a special place. 1 John 1:5 informs us that “God is light”, linking the spiritual concept of light with the physical manifestation. The absence of God’s glory, blessing, and/or protection is described as darkness throughout the Bible.
Fourth, the “day” is a 24-hour period of time. The Old Testament was written in Hebrew. When the word day (Hebrew: yom) is used in reference to a number (“first”, “second”, etc.) or with the words “evening” and “morning”, it always means a 24-hour day. Here it is used with both. As further confirmation, note that God established a six-day workweek with a Sabbath day of rest based on the creation week. (Exodus 20:9-11)
Fifth, God initially did not use the sun and moon as lights for day and night. The sun and moon were not created until the fourth day. (Genesis 1:16-19) This is not a problem for God. It’s only a problem for those who reject Him. In eternity, we will have light without the sun. (Revelation 22:5) God is the Creator of both light and darkness (Isaiah 45:7) and He decides when they are active.