Lightsticks are like magic: a light you can carry around, with no apparent energy source. It's not magic that makes glowsticks work, though, but chemistry.
It's all about the chemistry.
Glowsticks are basically plastic tubes. Inside the tube is a glass vial (or more than one) containing chemicals. When you bend the glowstick, you break the fragile glass vial and release the chemicals. When the chemicals come in contact, they create a chemical reaction.
Do you remember in school, mixing vinegar and baking soda to get a surprising foamy mess? That's a common example of a chemical reaction: a couple of chemicals get together and surprising things happen.
In a glowstick, one of the chemicals is often hydrogen peroxide, a substance you might have in your bathroom cabinet. The other active ingredient is a phenyl oxalate ester, a harmless chemical that doesn't come up much outside of glowsticks. Esters in general are combinations of alcohols and acids; you find them in the natural scent of many fruits, in perfume, and also in plastics. Since these two chemicals are common, harmless things, you can feel confident that glow bracelets, glow necklaces, and other lightsticks are safe for you and your kids.
The chemical reaction between these two substances produces enough energy to make light. It doesn't create enough energy to make heat or explosions, but it does make a nice longlasting light source.
Where do the colors come from?
Colored glowsticks also contain fluorescent dyes. The energy created by the chemical reaction gets the molecules of the dye moving, and that creates the color.
As with many other chemical reactions, heat affects the performance of glowsticks. A colder environment will make a dimmer, longer lasting light, while heat will increase the brightness of your glowstick and make it last less long. If you want a dramatic effect and you don't need it to last very long, put your glowsticks in warm water or in the sun to supercharge them. If you want them to last for hours, but with a more subtle light, then put them in the freezer for a little while before you use them.