Light is a wave, like water. Water waves are made when something disturbs the water, like dropping a pebble into the water. If something jostles the the pebble another rippe is sent out.
Light is a wave in something like water, called an electro magnetic field. This is the thing you feel when you try and place to magnets close to each other. Instead of pebbles, whenever an electron is bumped it makes ripples in this field. That ripple is light.
The reason the electrons are getting bounced in a fire is because hot materials have faster moving atoms (that’s what temperature really is, fast or slow atoms). If they collide they bounce the atoms and electrons around, causing ripples (light) to spread out from the impact.