"And God made two great lights; the greater light to rule the day, and the lesser light to rule the night: he made the stars also." (Genesis 1:16)
It seems that throughout history, mankind has ignored or distorted the purpose for which God created the sun. Many cultures have even worshiped the sun, teaching that the sun was the source of all being, even human life. Temples were built in its honor, human sacrifices were made to appease it, whole civilizations were dedicated to its worship.
The nation Israel, which had lived among sun-worshiping Egyptians for centuries, was warned not to "lift up thine eyes unto heaven, and . . . |see| the sun, and . . . be driven to worship" (Deuteronomy 4:19) under penalty of death, "For the LORD thy God is a consuming fire, even a jealous God" (Deuteronomy 4:24).
One of mankind's primary purposes is to worship God, but the sun was created by God for man's benefit. He is a God of grace and desires to "freely give us all things" (Romans 8:32).
The purpose of the sun is no mystery. Its Creator says that along with the moon and stars it is "to divide the day from the night . . . and . . . be for signs, and for seasons, and for days, and years . . . to give light upon the earth" (Genesis 1:14-15).
There will come a time, however, when the sun will no longer be needed by God's people, for in our eternal home "there shall be no night there; and they need no candle, neither light of the sun; for the Lord God giveth them light" (Revelation 22:5). "And the city had no need of the sun, neither of the moon, to shine in it: for the glory of God did lighten it, and the Lamb is the light thereof" (Revelation 21:23).
Best of all, we shall be with Him. JDM