The gummy bear explosion involves a reaction between potassium chlorate (KClO3) and glucose (the sugar in gummy bears). When potassium chlorate is melted, it decomposes to potassium chloride (KCl) and oxygen gas (O2).
Sugars (such as glucose, sucrose, etc.) are a great source of carbon, CO2, H2O and evergy when broken down. The energy given out is essentially our energy source when sugars are processed in our bodies.
When the gummy bear is dropped into the molten potassium chlorate, the sugars in the bear provide fuel to react with the O2 gas. This reaction is highly exothermic (gives out heat). This extra heat fuels the reaction even more, resulting in an explosion. This explosion completely annihilates the gummy bear.
Check out the video
here.