Fireflies rely on precise control of flash timing for two purposes: finding mates, and luring prey.http://ase.tufts.edu/biology/Firefly/
In the group Photinus, flashing represents a visible courtship signal. Within each species, males and females identify members of the opposite sex based on flash timing.
In the group Photuris, flashing serves an additional purpose. Female Photuris fireflies are highly specialized predators that can facultatively imitate the flash signal given by other species' females. Using this false signal, these predatory females are able to lure in unsuspecting Photinus males, then eat them.
PNAS article with above findings: http://www.pnas.org/cgi/content/abstract/94/18/9723
also fascinating: http://iris.biosci.ohio-state.edu/projects/FFiles/