If the sun were to explode, it would be a catastrophic event for our solar system. The sun plays a major role in Earth's climate, it provides light, heat and energy. Without the sun, life on Earth would cease to exist.
Would we see it immediately?
Actually, we would not see the sun's explosion immediately. The light from the sun takes about 8 minutes and 20 seconds to reach Earth. Therefore, we would not be aware of the sun's explosion until about 8 minutes after it happened.
And what would happen to the Earth?
If the sun exploded, the resulting shock wave could destroy everything in its path, including Earth. Additionally, without the sun's gravitational pull, planets would lose their orbits and will move in a straight line into space.