When a gummy bear or other sugary candy is dropped into molten potassium chlorate, the candy bursts into flames with a loud noise accompanying the initial reaction. This is because potassium chlorate is a strong oxidizer, and sugar contains a large amount of energy in its chemical bonds.
Potassium chlorate decomposes into potassium chloride and oxygen when it is exposed to high heat. When the candy is dropped into the potassium chlorate, the oxygen reacts with the sugar, and energy is released. If there is a large amount of oxygen, as is the case if the potassium chlorate is molten rather than a solution, the energy is created so rapidly that it outpaces the ability of the candy to release heat. This causes the candy to burst into flames.