system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: how does burning stuff produce light?
gpt
Burning stuff produces energy in the form of heat, which we perceive as an increase in temperature.

The electromagnetic radiation (light) given off by something is proportional to the fourth power of the temperature, which is a fancy way of saying that the color goes up as the temperature goes up.

In reality, everything gives off light all the time, because everything has temperature. You even give off light, though our eyes are not capable of seeing that light. It's called "Infrared" light. Well, at a certain temperature, we can start seeing that light, and the first color we can see is red, which is why if you heat something, that's the first color it begins to emit. Up the scale goes through orange, then yellow, white, then blue. It peaks out at blue because we can't see colors beyond that, and while it is still emitting higher energy colors (Ultra Violet, X-Ray), it's also still emitting all of the colors below that too. Blue ends up overpowering the rest, which is why it is blue and not an apparent mix of all the colors.

A little further detail as to why,

Temperature is really just the back and forth oscillations of atoms. The hotter they are, the faster they bounce back and forth. What we call color is really just the number of times an atom bounces back and forth in a given time period. Red light literally bounces back and forth slower than blue light. This is why UV light is harmful, it bounces back and forth so fast that it imparts too much energy into our skin and breaks our skin cells apart. 

Light is called "Electromagnetic" radiation because it is the electrons in the atom that are oscillating, and the fabric of spacetime is what is carrying those oscillations (as radiation) from the electron to whatever it is going to hit.