Dear Student, It is a hypothetical question and there are various theories to explain if this happens. But fortunately this is not going to happen soon. If sun explodes it will surely destroy the earth by its heat wave. Temperature of all the plants will rise and the whole atmosphere will be disturbed. Regards.