Why does it say "Lecha Yom"?
Rashi: The redemption of Yisrael [is upon You].
Why does it say "Af Lecha Laylah"?
Rashi: With You were the afflictions of the night.
Radak: Just like it mentioned opposites that He did for Yisrael (turned a rock into a spring, and dried a river), it mentions opposites in the creation. Even night, which seems without benefit, has benefit - it is rest for man, and time for Chayos to catch their prey. You arranged that half the time will be night, for the benefit of Your creations!
Malbim: You can change the order of existence, since You fixed it and it is all from You. You fixed the trajectories of the luminaries, both (a) the daily revolution from east to west, which causes day and night. Even though night is the absence of light, it is attributed to You. Also for it You prepared the light of the moon, which it receives from the sun. Also refer to 74:17:2:3.
What are "Ma'or va'Shamesh"?
Radak (17): Ma'or is the light of the moon and stars at night; Shamesh is the light of the sun during the day - "Es ha'Ma'or ha'Gadol l'Memsheles ha'Yom v'Es ha'Ma'or ha'Katan l'Memsheles ha'Laylah v'Es ha'Kochavim" (Bereishis 1:16).
How did Hashem prepare "Ma'or va'Shamesh"?
Rashi: From the light of the Torah.
Radak: The benefit of the sun is revealed - it gives light and warmth. The light of the moon and stars are needed for people going in Midbaros or on the sea. They also help vegetation - "Geresh Yerachim" (Devarim 33:14; Rashi there - some Peros, e.g. gourds, the moon ripens them). The moon has power also in the sea, and it says "Ma'adanos Kimah Oh Moshchos Kesil 1 " (38:31). Every star has power over vegetation, rocks or metal - there is no grass below without a Mazal above in the Raki'a that hits it and tells it to grow (Bereishis Rabah 10:7).
Presumably, he brings the verse to show the power of the stars, like he discusses after this. (PF)