וְהָי֤וּ לִמְאוֹרֹת֙ בִּרְקִ֣יעַ הַשָּׁמַ֔יִם לְהָאִ֖יר עַל־הָאָ֑רֶץ וַֽיְהִי־כֵֽן׃
און זײ זאָלן זײַן פֿאַר ליכטער אין דעם אױסשפּרײט פֿון הימל, צו לײַכטן אױף דער ערד. און עס איז אַזױ געשען.
Rashi
והיו למאורות AND LET THEM BE FOR LIGHTS — They shall serve also this purpose, namely, to give light to the world.
Chizkuni
ברקיע השמים להאיר על הארץ, ”in the sky of theheavens to disseminate light all over the earth.” One of the luminaries’ functions is similar to that of lanterns which are also always placed on high poles to better illuminate their surroundings. According to the plain meaning of the text, the sun and moon are necessary to illuminate earth, whereas the light created on the first “day,” is needed to illuminate the heavenly regions, seeing that on the second “day,” a partition had been erected between the former and the latter by the horizon/atmosphere. Alternately, when the Torah reported that on the first “day” light came into existence, i.e. ויהי אור, this was the “light” which enabled “life” to exist, whereas here we speak about the light provided by the sun and moon respectively. Although as yet this “light” was not needed as the creatures for which the sun and moon were to shine had not been created yet, there were grasses and fruit bearing trees which needed it in order for them not to wither and die. The fruit could not have ripened without the rays of the sun. We also know from Deuteronomy 33,14, that there are plants which cannot grow without moonlight. Furthermore, G-d had created some living creatures such as creeping things and birds on the fifth “day,” and the means for their survival had to exist before they came into existence.
Rashbam
והיו למאורות, they should provide light for the physical universe.