I usually do this demo with a Gummy bear, but all I had was Gummy worms, so that's what I used. Sucrose has a lot of energy stored in the bonds that hold the carbon, hydrogen and oxygen atoms together. With a little bit of activation energy (melting the potassium chlorate) and a large supply of oxygen gas, (supplied by the potassium chlorate) that energy gets released in the form of light and heat energy (exothermic).