Purpose Before Process
(ג) וַיֹּ֥אמֶר אֱלֹהִ֖ים יְהִ֣י א֑וֹר וַֽיְהִי־אֽוֹר׃

(3) G-d said, “Let there be light”; and there was light.

(יד) וּמִמֶּ֖גֶד תְּבוּאֹ֣ת שָׁ֑מֶשׁ וּמִמֶּ֖גֶד גֶּ֥רֶשׁ יְרָחִֽים׃

(14) With the sweetness of the produce of the sun, And the sweetness of the yield of the moon;

(א) וממגד תבואת שמש. שֶׁהָיְתָה אַרְצוֹ פְּתוּחָה לַחַמָּה וּמְמַתֶּקֶת הַפֵּרוֹת (ספרי):

(1) וממגד תבואת שמש with the sweetness of the produce of the sun — for this land lay exposed to the sun and it therefore produced sweet fruit

כדר' אלעזר דא"ר אלעזר אור שברא הקב"ה ביום ראשון אדם צופה בו מסוף העולם ועד סופו...עמד וגנזו מהן...ולמי גנזו לצדיקים לעתיד לבא

The Gemara answers: This should be understood in accordance with Rabbi Elazar, as Rabbi Elazar said: The light that the Holy One, Blessed be He, created on the first day was not that of the sun but a different kind of light, through which man could observe from one end of the world to the other...but the Holy One, Blessed be He concealed it...And for whom did He conceal it? For the righteous people in the future.

...בְּנֹהַג שֶׁבָּעוֹלָם מֶלֶךְ בָּשָׂר וָדָם בּוֹנֶה פָּלָטִין, אֵינוֹ בּוֹנֶה אוֹתָהּ מִדַּעַת עַצְמוֹ אֶלָּא מִדַּעַת אֻמָּן, וְהָאֻמָּן אֵינוֹ בּוֹנֶה אוֹתָהּ מִדַּעַת עַצְמוֹ אֶלָּא דִּפְתְּרָאוֹת וּפִנְקְסָאוֹת יֵשׁ לוֹ, לָדַעַת הֵיאךְ הוּא עוֹשֶׂה חֲדָרִים, הֵיאךְ הוּא עוֹשֶׂה פִּשְׁפְּשִׁין. כָּךְ הָיָה הַקָּדוֹשׁ בָּרוּךְ הוּא מַבִּיט בַּתּוֹרָה וּבוֹרֵא אֶת הָעוֹלָם.

...In the way of the world, a king of flesh and blood who builds a castle does not do so from his own knowledge, but rather from the knowledge of an architect, and the architect does not build it from his own knowledge, but rather he has scrolls and books in order to know how to make rooms and doorways. So too the Holy One, blessed be He gazed into the Torah and created the world.

(כא) לִקְרַאת שַׁבָּת לְכוּ וְנֵלְכָה, כִּי הִיא מְקוֹר הַבְּרָכָה, מֵרֹאשׁ מִקֶּדֶם נְסוּכָה, סוֹף מַעֲשֶׂה בְּמַחֲשָׁבָה תְּחִלָּה:

Come let us welcome Shabbat, for it is the source of blessing. From the beginning, from before time it was chosen; last in creation, first in [G-d's] thought.

בואו ונחשב חשבונו של עולם הפסד מצוה כנגד שכרה ושכר עבירה כנגד הפסדה

Come and let us calculate the account of the world, i.e., the financial loss incurred by the fulfillment of a mitzva in contrast to its reward, and the reward for committing a transgression, i.e., the pleasure and gain received, in contrast to the loss it entails.

התכלית הוא עולם הזה התחתון. שכך עלה ברצונו ית', להיות נחת רוח לפניו ית' כד אתכפיא סטרא-אחרא ואתהפך חשוכא לנהורא, שיאיר אור ה' אין סוף ברוך הוא במקום החשך והסטרא אחרא של כל עולם הזה כולו ביתר שאת ויתר עז ויתרון אור מן החשך מהארתו בעולמות עליונים

the ultimate purpose [of creation] is this lowest world, for such was His blessed will that He shall have satisfaction when the sitra achra is subdued and the darkness is turned to light, so that the Divine light of the blessed En Sof shall shine forth in the place of the darkness and sitra achra throughout this world, all the more strongly and intensely, with the excellence of light emerging from darkness, than its effulgence in the higher worlds

לקו"ש ח"י ע' 9
ובזה יובן למה נברא האור ביום ראשון, קודם כל שאר הנבראים, כי האור היא המטרה שקבע הקדוש ברוך הוא בהקדמה לבריאת עולמות, במאמרו הראשון — "יהי אור" — כלומר, שכל הבריאה העתידה להיות, העולם על כל פרטיו וברואיו,כל זה יהפך ו"יהי אור."

Likkutei Sichos vol. 10, pg. 9
This explains why light was created on the first day, before any other creation: It is because light is the purpose with which G‑d prefaced the Creation of the worlds, with His first utterance—“Let there be light.” It means that everything that is about to be created—the world in all its details and constituent creations—all of it will be transformed into light.

(לא) וַיַּ֤רְא אֱלֹהִים֙ אֶת־כָּל־אֲשֶׁ֣ר עָשָׂ֔ה וְהִנֵּה־ט֖וֹב מְאֹ֑ד וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר י֥וֹם הַשִּׁשִּֽׁי׃ (פ)
(31) And God saw all that He had made, and found it very good. And there was evening and there was morning, the sixth day.

וחכמים אומרים בשעה שנולד משה נתמלא הבית כולו אור כתיב הכא ותרא אותו כי טוב הוא וכתיב התם (בראשית א, ד) וירא אלהים את האור כי טוב

And the Rabbis say: At the time when Moses was born, the entire house was filled with light, as it is written here: “And when she saw him that he was a goodly [tov] child,” and it is written there: “And God saw the light, that it was good [tov]” (Genesis 1:4).

לקו"ש ח"י ע' 9
והענין: מטרת הפעולה (במשל, באדם למטה) מתבטאת בשני אופנים:

א) כמטרה העיקרית והכוללת במחשבתו בגילוי כפי שהיא באה ובהתחלתה --לפני הפעולה וכוונתו של הפועל;

ב) כמו שמטרת הפעולה נרגשת באדם בעת הפעולה בכל פרט ופרט שהוא עושה, בכדי שכולם יתאימו לתכליתם ומטרתם — דהיינו שהמטרה אינה נמשכת אז, בעת הפעולה, בכל גילויה והיקפה, כמו לפני הפעולה.

ועל דרך זה יובן גם במטרה העליונה של כל הבריאה — האור "שנברא ביום ראשון" — שיש בה שתי מדרגות: א) מדריגת עצם האור (שהוא מפורש בתורה): "וירא אלקים את האור כי טוב" -- האור (עצמו) כמו שהוא מתגלה ביום ומאמר ראשון קודם התהוותם של כל נבראי העולם, וכמטרתם ותכליתם; ב) הארה ומעין מה״אור״ הנמשך בכל מאמר ונברא פרטי, שהאור האלקי הזה הוא הנותן את הכח והאפשרות בנבראים שיתאימו למטרתן — שיהפכו לאור.

ועל ״אור״ ומטרה זו נאמר: ״וירא אלקים כי טוב" -- היינו "אור" אבל אינו בגילוי ממש (כי אם ברמז, העלם) כמו ביום ראשון.

Likkutei Sichos vol. 10, pg. 9
The purpose of any action (say, for example, that of a person) can be expressed in two ways:

1. As revealed in the mind and intent of the actor, as a primary and overarching sense of purpose, before the act itself, and in its early stages

2. During the act itself, as the person perceives the overall purpose of every specific thing he does, so that they are all in accord with their purpose and their goal. Throughout the duration of the act, the purpose is not being conveyed as openly, or to the same extent, as it was before the act.

Similarly, the supernal purpose of Creation—signified by the light “that was created on the first day”—has two levels:

1. The level of the light itself (which is mentioned explicitly in the Torah): “And G‑d saw the light, that it was good”—that is the light (itself) that was manifest on the first day and the first utterance, before every other creation in the world, as their ultimate purpose.

2. A ray and reflection of that light was conveyed in each successive utterance and creation. It is this G‑dly light that enables these creations to align with and achieve their purpose—to transform creation into light. Of this “light” and purpose it was said, “And G‑d saw that it was good”—meaning, “that it was light,” but (merely an allusion to it, that is, hidden, and) not as fully revealed as it was on the first day.