The light of the sun is due to a chemical process on its surface that has been taking place continuously for the past five billion years. It will come to an end at some point of time in the future, when the sun will be totally extinguished, leading to extinction of all life on earth.
Regarding the impermanence of the sun’s existence, the Qur’an says:
“And the Sun runs its course for a period determined for it; that is the decree of (Him) the exalted in Might,the All-Knowing.”[Al-Qur’an 36:38]
Thus the Qur’an says that the sun runs towards a determined place, and will do so only up to a pre-determined period of time – meaning that it will end or extinguish.
From the book [The Quran and Modern Science Compatible or Incompatible?]