'Flame' is the phenomenon that you see when something is burning, and 'phenomenon' is a good word for it because this thing you see is neither a liquid nor a solid, nor, a gas, but rather a special visible wave of intense heat energy being released. Flames are generally yellow or orange, but really hot parts of flames are blue or white. Generally, there is one flame if a candle is lit, but many flames in a fire, and they can move. I hope this description clearly reflects the object we are referring to.
On the other hand, a 'flash' can be a noun, but it is also a verb (whereas flame is only a noun, not a verb). 'Flash' expresses a sudden, bright release of light, sometimes in a beam, as in a flash of lightning, and sometimes that flash can light up the whole sky, if it is strong enough. Flashes are more closely associated with sparks and one'time releases of energy in the form of light. (Recall that flames are the manifestation of the release of energy in teh form of heat, but a heat so intense that it creates light as a secondary byproduct.)
When you burn a match, maybe light flashes when the match ignites because a lot of light is suddenly released, but the flash is instantaneous and only lasts a split-second because the energy has given way to a create a more stable visible flame.
"When I lit the match, a flash of light illuminated the room for a split second, but when the flame stabilized on the wick, I had a steady, albeit small, glow to study the object of my attention."
Hope this helps!