God made the sun, moon and stars on the fourth day of creation. He created the universe and set it in motion.
God created the heavenly lights to mark the seasons days and years - to help us measure the passage of time.
The earth is exactly at the right distance from the sun. Any closer, and it would be too hot on the earth for us to survive. Any further away, and we would freeze!
The earth is also tipped at the right angle to allow the sun to reach a large part of the earth in the summertime. If the earth weren't tipped, most of the U.S.A. and Canada would never get warm enought to grow plants.
David writes in Psalm 8 that when he looks up at the moon and the stars, he feels small and unimportant in the universe. He wonders why God thinks about mankind at all, but praises Him for crowning man "with glory and honor."
Psalm 8:1 O LORD, our Lord, how majestic is your name in all the earth! You have set your glory above the heavens.
Psalm 19:1-4 says that the heavens announce God's glory to everyone who sees them, and that people of every land and language can understand God's glory from seeing His work in the heavens.
The heavens declare the glory of God; the skies proclaim the work of his hands. Day after day they pour forth speech; night after night they display knowledge. There is no speech or language where their voice is not heard. Their voice goes out into all the earth, their words to the ends of the world. In the heavens he has pitched a tent for the sun,