“וְהָאָרֶץ, הָיְתָה תֹהוּ וָבֹהוּ, וְחֹשֶׁךְ, עַל-פְּנֵי תְהוֹם; וְרוּחַ אֱלֹהִים, מְרַחֶפֶת עַל-פְּנֵי הַמָּיִם”
“The earth was formless and void, and darkness was over the surface of the deep, and the Spirit of God was hovering over the surface of the waters.”
Rabbi Ashlag explains that the spirit of God, Ruach, is the aspect of the upper light, hovering over the waters. There was another Ruach on the lower level that existed from the first Tzimtzum. When the second Tzimtzum came to be, the Ruach of the lower level moved out and the world could be created.
“וַיֹּאמֶר אֱלֹהִים, יְהִי אוֹר; וַיְהִי-אוֹר”
“Then God said, “Let there be light”; and there was light.”
The first command “Let there be light” refers to the light of the upper three Sefirot. This light made the Ruach that covered to unformed earth to move away and the light would shine on the lower levels. This is the aspect of “and there was light”.
The ‘sea Monster’, Leviathan, (See DZ commentaries 2344-2348) is from the left, judgments, received his upper three sefirot and continued its light to the lower level through its level of Zeir Anpin as described ‘water coming out of his nostrils’.
The light that came out of Binah revealed through 72 lights shining out from the sun. The wicked connected to these lights and worshipped the sun. When the Holy One Blessed be He saw the improper use of these lights, he removed and concealed them. The Leviathan was also using the judgments that the wicked created when using the 72 lights. He was creating destruction until God concealed that light.