"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).
This description is of the holy city, which someday will come down from God out of heaven to be established on the new Earth when "the first earth" will have "passed away" (Revelation 21:1). Note also that "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).There will be no need for night there, for no one will ever need to sleep. The residents of the city will have glorified bodies, like that of their Redeemer (see Philippians 3:21).
That all sounds wonderful, but there does seem at first to be a contradiction with certain passages which reveal that God's created heavens will exist forever. "Praise ye Him, sun and moon: . . . for He commanded, and they were created. He hath also established them for ever and ever: . . ." (Psalm 148:3,5-6). ". . . whatsoever God doeth, it shall be for ever . . . " (Ecclesiastes 3:14). He is the Creator, not the de-Creator. "[David's] seed shall endure for ever, and His throne as the sun before me. It shall be established for ever as the moon, and as a faithful witness in heaven" (Psalm 89:36-37).
But the sun and moon, like the earth, have to be purified. Because of sin (angelic as well as human), "the whole creation groaneth and travaileth in pain together until now" (Romans 8:22). God will have to "create" new heavens, including sun and moon, like the new earth, but they will be the originals simply made new again, for they were all "very good" (Genesis 1:31) in the first place. However, although they will then remain forever, those in the holy city will not need them for light, for God, who is Light, will be its light, and "there shall be no night there." HMM