Fetching details from the dictionary...
to flash (e.g. lightning); to flicker; to glitter; to sparkle; to gleam
to flutter (e.g. flag); to wave; to undulate
to flash into one's mind (e.g. an idea); to come to one suddenly
いいアイデアが閃いた。
A good idea flashed to me.
解決策が突然閃いて叫んだ。
A solution suddenly flashed to me and I cried out.
遠くの空に稲光が閃くのが見えた。
I could see lightning flashing in the distant sky.