My grandson and I were sitting outside last evening, before the mosquitoes started to invade our space, and we wondered aloud about the Lightening Bugs and why they flash. I decided to do a search to see what I could find.I learned that Lightning Bugs are beetles. They can't be "flies" as their name suggests because "flies" are members of the Fly Order and Lightning Bugs are the same as Fireflies; members of a particular family of the Beetle Order.
And why do they flash? They are trying to attract mates. Most males fly about flashing while females perch on vegetation, usually near the ground. If the female sees a flasher and she's ready to mate she responds by flashing right after the male's last flash. A short flash dialogue takes place as the male flies closer and closer, and then, if all goes well, they mate.
So that a flasher doesn't attract a firefly of a different species, each Lightning Bug species has its own special flash pattern.
Lightning Bugs live on the ground, under bark, and in moist swampy places. They eat earthworms, snails and slugs, plus they may scavenge certain small dead animals and other organic material . They have been seen following slime trails to their slug and snail victims.
As a child, I remember catching Lightning Bugs, pulling off the flasher, and placing it on the top of the ring finger. It was yucky "gooey" I recall, but would stick quite well, and continue to glow long before I decided to abandon it and be on to something else, never realizing that I was killing a defenseless little bug. Poor little beetle!