Come and see: each of the six days of Creation has its own form and face of the grade that guides it. You will not find a day that has no good in it. That is, it says in them: “And Elohim saw that it was good” (Genesis 1:10). Although “that it is good” was not mentioned on the second day, you will find it on the third day. Therefore, “good” is mentioned twice in it.
And God said: Let the waters [of the second day] under the heaven be gathered together unto one place, and let the dry land [Hod] appear: and it was so. And God called the dry land Earth; and the gathering together of the waters [of the second day] called he Seas [Yesod]: and God saw that it [the second day] was טוב [towb, good]. And God said, Let the earth bring forth grass, the herb yielding seed, and the fruit tree yielding fruit after his kind, whose seed is in itself, upon the earth: and it was so. And the earth brought forth grass, and herb yielding seed after his kind, and the tree yielding fruit, whose seed was in itself, after his kind: and God saw that it was good. And the evening and the morning were the third day. – Genesis 1: 9-13
Every day [of Genesis] has its exterior barriers, so that not everyone would be able to enter into the goodness in it, meaning there is darkness that veils the light, as you will find light in the first day, and also find darkness in it. And so, in every day there are barriers that guard like thorns that guard the vineyard, so that strangers will not enter it. There are other types of guardians, like snakes, scorpions, and poisonous serpents that protect the good, so that unworthy people will be unable to enter. If there were no barriers, all the wicked would have the ability to access the secrets [Kabbalah] of the Torah.
Therefore, many angels of destruction [Apollyon] that are called darkness and obscurity, and snakes and scorpions that are called wild animals, confuse the mind of whoever is wicked and has access to the secrets [Kabbalah] of the Torah to prevent his entry where he does not belong.
However, all these guardians are at the assistance of whoever is good, and the prosecutor becomes a defendant. They bring him to the concealed goodness and they will say to the concealed Goodness: “Our Master, here is a good person, virtuous, heaven fearing, who wishes to enter before You. And he tells us, ‘Open to me [Hei] the gates of righteousness. I [Vav] will go in to them, and I will [Hallelu] praise [Iod-Hei] Jah’ (Psalms 118:19).” Then, that concealed goodness will reply to them to open for him the gate of [chaste] love or the gate of repentance [mystical death]. Every righteous person shall enter according to his degree, the meaning of it being: “Open the gates that the righteous Goyim which keepeth the truth [Chastity] may enter” (Isaiah 26:2).
Excerpted from Sepher ha Zohar 38. Naso 4.