The flint crystal hits the Frizzen and fractures thin layers at the tip. As these crystals break off their molecular bond they release energy across the spectrum.. our eyes detect it as a "spark" of light, but there is infrared and other wavelengths contained in the release. At its hottest there will be plasma surrounding the tiny crystal fragments.
This concentrated microscopic hotspots, either by direct conduction or by radiation, break apart the potassium nitrate molecule which leaves nitric acid + potassium (possibly why very fine powder is preferred on the pan.) This reaction releases energy and triggers the separation of the bonds of 1 of the 3 oxygen atoms in the nitrate.. which releases even more energy, and an oxygen atom to further chem down the trail... the rest of the molecule oxydizes with the potassium atom to form "potassium nitrite".
And so, in the bulk of the reaction, you end up with one Oxygen molecule (O2) for every pair of potassium nitrite molecules.
This free O2 is the oxidizer for the coal and sulfur, which also enjoyed the micro hot spots from the flint breakages and have begun reacting with lots of the generated oxygen.
The sulfur and the carbon will oxidize into carbon and sulfur di-oxides (gases)... HOT gases. As they oxidize they will emit high levels of energy in a multitude of ranges. Lots of infrared in high intensity, at close proximity.. and in a brief, brief, time.
The thing to remember here is that to trigger these reactions, you just need to hit a few molecules just right.. and then they will chain react.. showering their neighboring molecules with all sorts of radiation... ...and hopefully reaching the bigger chunks across the "flash hole"... otherwise, you have to take the long road and have the thermal aspect of this reaction get you across the pan, and through the hole.
So a little bit of both.. one is incomplete without the other.