I have been fascinated with lightning bugs since I was that child collecting them in a jar. (think circa 1940)
On this site: http://www.dnr.state.wi.us/org/caer/ce/eek/critter/insect/firefly.htm , the matter of the WHY of the lights is discussed in easy lay (no pun intended) terms. for example:
"The male firefly of the species Photinus pyralis, beams a single half-flash during a forward rising flight movement. It looks like the letter "J." The female responds with a single flash. Another species, Photinus consumilis, signals his mate with a rapid succession of flashes. She responds with two beams. In general, males will not fly down to a female that sends the wrong species signal. But, some females of differing species have evolved the ability to mimic the response flashes of species other than their own. As the male flies down to a mimicking female, he is captured and eaten, gulp!"
A good selection of scientific info can be gleaned by doing a web search using the words: "fireflies mating signals".
I can remember lying of a summer night in the hammock with a pen light, seeing how much allure I could fake for the amorous bugs flying about.