(Genesis 1:14-15) "And God said, Let there be lights." Only the orb of the sun was created to give light, as it is said, "Let there be lights" [me'orot is written defectively, as if reading me'erat, a curse]. If so, why was the moon created? Rather, the Holy One, blessed be He, foresaw that the nations of the world were destined to make them into deities. The Holy One, blessed be He, said: If, when they are two and contradict one another, the nations of the world still make them into deities, had there been but one, how much more so would they do this. Rabbi Berekhiah said in the name of Rabbi Sima: Both of them were created to give light, as it is said, "And let them be for lights, and God set them in the firmament of the heaven to give light" (Genesis 1:15,17). "And let them be for signs" - these are the Sabbaths, as it is written, "It is a sign between Me and the children of Israel forever" (Exodus 31:17). "And for appointed times" - these are the festivals, as it is written, "These are the appointed times of the LORD" (Leviticus 23:4). "And for days" - these are the new moons, as it is written, "for a month of days" (Numbers 11:20). "And years" - these are the new years.
Why Two Lights Were Made and the Seasons They Mark
Yalkut Shimoni on Torah 8:8
(בראשית א יד-טו) וַיֹאמֶר אֱלֹהִים יְהִי מְאוֹרֹת, לֹא נִבְרָא לְהָאִיר אֶלָּא גַלְגַל חַמָּה בִּלְבַד, שֶׁנֶּאֱמַר יְהִי מְאֹרֹת (מְאֹרֹת כְּתִיב) אִם כֵּן לָמָּה נִבְרֵאת לְבָנָה, אֶלָּא צָפָה הַקָּדוֹשׁ בָּרוּךְ הוּא שְׁאֻמּוֹת הָעוֹלָם עֲתִידִין לַעֲשוֹתָן אֱלֹהוּת, אָמַר הַקָּדוֹשׁ בָּרוּךְ הוּא, מָה אִם בְּשָׁעָה שֶׁהֵם שְׁנַיִם וְהֵם מַכְחִישִׁים זֶה אֶת זֶה אֻמּוֹת הָעוֹלָם עוֹשִים אוֹתָם אֶלֹהוּת, אִלּוּ הָיוּ אֶחָד עַל אַחַת כַּמָּה וְכַמָּה רַבִּי בֶּרֶכְיָה בְּשֵׁם רַבִּי סִימָא אוֹמֵר, שְׁנֵיהֶם נִבְרְאוּ לְהָאִיר, שֶׁנֶּאֱמַר (יְהִי מְאוֹרוֹת) וְהָיוּ לִמְאוֹרֹת וַיִּתֵּן אֹתָם אֱלֹהִים בִּרְקִיעַ הַשָּׁמָיִם לְהָאִיר. וְהָיוּ לְאֹתֹת, אֵלוּ שַׁבָּתוֹת, דִּכְתִיב (שמות לא, יז) "בֵּינִי וּבֵין בְּנֵי יִשְרָאֵל אוֹת הִיא לְעֹלָם". וּלְמוֹעֲדִים, אֵלּוּ יָמִים טוֹבִים, דִּכְתִיב (ויקרא כג, ד) "אֵלֶּה מוֹעֲדֵי ה'". וּלְיָמִים, אֵלּוּ רָאשֵׁי חָדָשִׁים, דִּכְתִיב "עַד חֹדֶשׁ יָמִים". וְשָׁנִים, אֵלּוּ רָאשֵׁי שָׁנִים.