Did you know…
Is it normal for jet engines to flash flame sometimes?
Short answer
Yes, seeing a brief flash out of the nozzle is usually normal and doesn't indicate a fault. Turbofans emit flashes at startup, during abrupt power changes, or when burning unconsumed fuel. A prolonged flame with loud bangs and power loss is different: that's a compressor stall, which requires crew action.

Normal flashes in a turbofan
A jet engine burns kerosene continuously in an annular combustor and expels gases at very high temperature. In certain situations, some of that fuel finishes burning outside the combustor, in the nozzle or just behind it, producing an orange flash lasting a fraction of a second. This happens mainly during startup, when the mixture hasn't stabilized yet; during rapid accelerations from idle, when the fuel control unit injects more fuel than the airflow can consume at that instant; and in some engines during shutdown, while the fuel lines are purged.
At night the effect is exaggerated: the eye catches a flare that would go unnoticed in daylight. The same happens with heavy rain or snow, which momentarily disrupt combustion. None of these situations damages the engine or shows up as a fault in the cockpit.
Compressor stall: the case that actually matters
The spectacular phenomenon people usually film is different: compressor stall, also known as surge. The compressor blades are small airfoils, and like any airfoil, they stall if the air reaches them at the wrong angle. When this happens to many blades at once, the compressor stops sustaining pressure upstream and the flow reverses violently: hot gases shoot forward out of the intake and backward out of the nozzle, with a sharp bang audible from the ground and a much longer, louder flame.
Common causes include bird ingestion, foreign object damage, ice, an extreme angle of attack or a strong crosswind that distorts the inlet flow, and worn or misaligned variable guide vanes. The engine may recover on its own or require the crew to reduce the throttle and follow the corresponding procedure; if it recurs, the engine is shut down and the aircraft lands at a suitable airport. Commercial aircraft are certified to fly and land with one engine inoperative, and crews train for this scenario periodically.
Afterburner: flames by design
There's a third case where the flame is the point of the design. Military fighters carry afterburners: they inject additional fuel into the exhaust jet, where unburned oxygen remains, and burn it to boost thrust by up to 50% at the cost of enormous fuel consumption. There, the bluish flame with visible shock rings — the so-called Mach diamonds — is the sign that the system is working correctly. No current commercial aircraft carries an afterburner; the last one was the Concorde, which used it for takeoff and transonic acceleration.
How to tell them apart as a passenger
The rule of thumb is simple: a brief, silent flash, usually during startup or a power change, is routine. A series of audible bangs, perceptible cabin vibration and repeated flames mean something is wrong with that engine. In that second case the crew detects it on their instruments long before any announcement, and the aircraft keeps flying normally: the design is exactly meant for that.
More questions

Physics of flight
Why can't a Corsair pilot apply full power when going around after a failed carrier landing?
Because at low speed and high power the Corsair would drop its left wing suddenly and with almost no warning, due to propeller torque. If the throttle was… more…

Physics of flight
What did the phrase "banking with intent to turn" mean among F-104 pilots?
It was a joke among Canadian F-104 pilots: banking the aircraft "with intent to turn" referred to its poor low-speed turning. Its sustained turn capability… more…

Julian Herzog (Website) (CC BY), vía commons Physics of flight
What is "flight envelope protection," which the A320 pioneered?
A set of limits embedded in the flight control software: it calculates the flight envelope, adds a safety margin, and blocks pilot inputs that would take the… more…

Julian Herzog (Website) (CC BY), vía commons Physics of flight
What is the A320's SHARP package for?
SHARP (SHort AiRfield Package) improves takeoff and landing performance on short runways and is designed to increase low-speed lift. It combines aerodynamic… more…

Physics of flight
What flaw sank Vought's all-metal V-141 fighter?
It wasn't a single flaw: tests showed the V-141 still flew poorly, was prone to spinning, and also suffered tail flutter, which is why it was rejected. It… more…

Physics of flight
What wind tunnel did NACA use to study the Corsair, and how big was it?
The full-scale 30- by 60-Foot Tunnel at the Langley Research Center, in Hampton, Virginia. NACA dedicated the facility on 27 May 1931 and used it to test the… more…