googling it for info was kind of interesting.
Quote
Horsehair worms are parasites of certain insects, especially crickets and grasshoppers. They are commonly found in puddles of water, on damp sidewalks and patios, or as they emerge from bodies of their insect hosts. Despite their sometime frightening appearance, these creatures are not harmful
Beetles, cockroaches, crickets or grasshoppers are the most common hosts in urban areas. Emergence from the host occurs only when the host is near water. Occasionally, horsehair worms are found after a cricket or cockroach is crushed, or when the host hops into a container of water, and the worm exits out of the insect’s body.
Since horsehair worms are parasitic, they are assumed to be beneficial in the control of certain insects. Its true value as a parasite, however, is questionable because the worm does not kill its host until it matures. Horsehair worms are not parasites of humans or pets.
http://citybugs.tamu.edu/factsheets/landscape/others/ent-1001/