what are lightning bugs purpose?
It appears to be a warning signal to predators, since many firefly larvae contain chemicals that are distasteful or toxic. Photic emission in the adult beetle was originally thought to be used for similar warning purposes, but it is now understood that its primary purpose is in mate selection.