This phrase may refer to a project or person that enjoys only short-lived success. Or it may mean something which has a showy beginning but fails to deliver anything of value.
In the mid 16th century, ‘flash’ had the sense of ‘to give off a sudden burst of light or flame.’ Since 1913, it has also been used to mean ‘photographic lamp.’
‘Flash in the pan’ originally had a literal meaning: a real flash in a real pan. Muskets used to have small pans to hold the gunpowder charge. An attempt to fire the musket in which the gunpowder flared up without firing a bullet was called a ‘flash in the pan.’
A more attractive idea, perhaps, is that the phrase derives from the Californian Gold Rush of the mid 19th century. Prospectors who panned for gold became excited when they saw something glint in the pan, only to have their hopes dashed when it proved not to be gold but a mere ‘flash in the pan, quite possibly ‘fool’s gold.’ This is ties in with another phrase related to disappointment – ‘it didn’t pan out.’ ‘Panning out’ can be traced to US prospectors and was used in the early 20th century to mean that the expected quantity of gold lived up to predictions.
This reminds me of writing advice that I read recently. “And once the book is out there, the work really starts. Publishing a book is like dropping a rose petal into the Grand Canyon and waiting for the echo.” And if there is no echo, you have to say ‘it didn’t pan out.’