When Vader tossed Palpatine into the pit, why did the Emperor apparently explode?
No official explanation has ever been given as to exactly why Palpatine exploded.
The script provides no insight:
The Emperor's body spins helplessly into the void, arcing as it falls into the abyss. Finally, when the body is far down the shaft, it explodes, creating a rush of air through the room.
This was an example of Dark Side Burst, which Wookieepedia describes as
A burst of dark side energy occasionally occurred when a powerful Sith or Dark Jedi was killed. The resulting shockwave was sometimes very powerful, other times it was a simple dissolving of physical matter.
Unfortunately, not even C-Canon has ever really explained just what causes the Dark Side Burst.
The new Disney canon novelization Beware the Power of the Dark Side! suggests that the explosion was caused by the Emperor hitting the reactor:
When at last he reaches the open shaft he hurls the Emperor down into the reactor. It’s a long, long way down and the Emperor fires his lightning upward as he falls.
He might still have used his powers to save himself, but his hate is now so strong his only thought is to cause Vader more pain. So the lightning continues to flicker and flash even after the body is out of sight.
And then comes a great explosion when his body finally reaches the reactor and a poisonous wind races up the shaft, knocking Vader at last to the floor.
Beware the Power of the Dark Side!
While there’s some room to interpret this (for example, it’s possible that he died when he hit the reactor, and his body exploded for some Force-related reason, as was the case in Legends), the implication seems to be that his body hitting the reactor was what caused the explosion.
There hasn't really been a quite so scientific answer to this question. It's all a matter of interpretation. In my view of the explosion, it was caused by the fact that there weren't many force sensetive (Jedi, sith) left in the galaxy at that point, and the Emperor had consumed all the powers of the force that the galaxy had offered. His powers were fueled with the loss of the Jedi.
The Emperor never truly showed his power, and this could be seen in various other stories, such as the Clone Wars. When he fell into the energy of the Death Star II, he died and all his power was released from his failed body. All that power was then flown away with such power that it caused an explosion. You may even go further than that, and say that when it was released, the force was being binded to a random selection of newly created force sensetive people. Hence why there are more Jedi and Sith in the Expanded Universe. But that, is just how I view it.
First of all, he couldn't have hit the reactor because (in the original version at least, and therefore the first and most accurate) the Emperor could still be seen falling when he exploded. It would make sense that his lightning might have triggered an explosion, but a lot of my sources say that the blue fire was the 'power of the Dark Side.' Honestly, anything could have happened, but the most likely conclusion that can be reached that he died and exploded as he was enveloped by his own lighting and killed himself. Or Snoke really wanted to convince Luke that he had 'died.' ;) ;)