It says on the first day of creation in Genesis that there was light. On the fourth day of creation, the sun was created. So what was the source of the primordial light on the first day of creation?
This is a very good but difficult and very deep question. I will not pretend that I fully understand its answers but let me bring two relevant explanations.
He explains that the light created on the first day was the light of creation, also called the primordial light, and is the divine emanation that forms the basis of creation. Creation is a contracted and sculpted emanation of that primordial light from God. It is not light as we know it, think of it more as primordial energy.
The very first act of Creation, as recorded in the Book of Genesis, was the creation of light. “And God said: There shall be light” (Gen. 1:3). What kind of light was this?
It cannot be the light that we are familiar with, the light emanating from the sun and the stars. These heavenly bodies were created much later, on the fourth day of Creation. The Sages called this primordial light Ohr Ha-Ganuz, ‘the Hidden Light.’ Too pure for the current state of the universe, God concealed it for a future, more deserving world.
The philosophers distinguished between chomer, matter, and tzurah, the form or function of an object. For example, wood is a raw material (chomer) that may be used to produce many different functional objects. Once it is designated for use as a table, the wood also has tzurah, form, having acquired a particular purpose.
At the very beginning of Creation, there was only chomer. God created numerous elements, but they were without tzurah. They lacked function and purpose. This state of disorder and dissonance is referred to as darkness — “darkness on the surface of the depths” (Gen. 1:2). The Torah calls this unstable primeval stage Tohu and Bohu, indicating that it was chaotic and empty of form.
Then God created the Ohr Ha-Ganuz. This special light played a critical role in Creation. Just as regular light allows us to see and relate to our surroundings, the Hidden Light enabled the different elements of creation to interact with one another. It dispelled the initial state of darkness, when all objects were isolated and disconnected from one another.
To use the terminology of the philosophers, the illumination created on the first day of Creation stamped a functional tzurah on the material chomer. Through this special light, the universe’s myriad objects acquired purpose and function and were able to work together towards a common goal.
The Midrash (Breishit Rabbah 3:4) elucidates the verse in Psalms, explaining that “God wrapped Himself in light like a garment and illuminated the splendor of His glory from one end of the world to the other.” What does it mean that ‘God wore light'?
This phrase indicates that the light took on God’s qualities of oneness and unity, just as a garment takes on the shape of the one wearing it. When ‘God wrapped Himself in light,’ this means that He introduced an underlying unity into all aspects of creation, ‘from one end of the world to the other.’
At first, God created heaven and earth in an isolated state, as chomer without form and purpose. This was the unstable state of Tohu and Bohu described in Genesis, when the diverse elements of creation existed in chaotic darkness, lacking an underlying unity.
Then God said, “There shall be light,” creating the special Ohr Ha-Ganuz, the Hidden Light with which He bound the matter together with a common purpose. God ‘wrapped Himself in the light,’ thereby giving the light His trait of oneness and making it a unifying force. After creating this unifying light, God ’spread out the heavens’ and stabilized the universe.