THE SUN WILL EVENTUALLY EXPIRE
And the Sun runs to its resting place. That is the decree of the Almighty, the All-Knowing. (Surah Ya Sin, 38)
Let's assume for a moment that the quran actually says that.
Logic dictates that either the sun will eventually expire, or its expiration is not eventual. Those are two mutually exclusive and exhaustive possibilities. Without any background knowledge whatsoever, there's a fifty-fifty chance that you will pick the correct of the two possibilities. Further, if you know anything about energy conservation and all that rot, you know that, because the sun radiates energy and no obvious or proposed way to replenish it, the sun will eventually run out of energy to radiate, and thus expire. You get no points for predicting the obvious.
The Sun has been emitting heat for around 5 billion years as a result of the constant chemical reactions taking place on its surface.
The source of energy for the sun comes from nuclear reactions, not chemical. Further, those reactions take place at the core, not the surface.
At a moment determined by Allah in the future, these reactions will eventually come to an end, and the Sun will lose all its energy and finally go out. In that context, the above verse may be a reference to the Sun's energy one day coming to an end. (Allah knows the truth.)
As stated before, this is obvious to anyone with any basic understanding of physics. You don't need a holy book to tell you that. So Allah's knowledge is on the same level of a high school student, if that. If he had guessed blindly, he has a 50-50 chance of getting any given fact correctly.
No, the important knowledge is not IF the sun will go out, but rather HOW LONG the sun has before it goes out, and Allah doesn't tell you that,
does he? But we have a reasonably correct answer, culled from watching other clusters of stars at various ages, and calculations from nuclear physics. The sun has about 5 billion more years shining as a main sequence star. After this time, it will evolve into a red giant for a few million years before sloughing off its outer layers and becomes a white dwarf, whereupon all significant radiation ceases and the sun will be effectively dead.