...usually when a star expands, it becomes a red giant. So the sun would turn red.
[But the way you're asking.]
If the sun was about to explode, Earth wouldn't be habitable. The sun would get really big, the edge of the sun would be too close for anything to really survive, if it wasn't swallowed.