1680s, "something that emits light in flashes," agent noun from flash (v.). Meaning "male genital exhibitionist" is from 1960s (meat-flasher in this sense was attested in 1890s and flash (v.) in the sense "expose the genitals" is recorded by 1846). Johnson (1755) has it also in the sense "one who makes a show of more wit than he possesses."
1791, "act of creating an artificial flood," verbal noun from flash (v.); also compare flash (n.2)). Meaning "indecent exposure" is by 1968 (see flasher). The meaning "strip of metal used in roofing, etc." is from 1782, earlier simply flash (1570s), but the sense connection is unclear and it might be an unrelated word.