Mothballs repell a lot of things, including some people.
The active ingredient in mothballs is actually a pesticide, typically napthalene or paradichlorobenzene. The EPA links short-term exposure of humans to naphthalene to cataracts, liver and neurological damage. The agency considers the chemical a possible carcinogen.
The EPA warns that short-term exposure to paradichlorobenzene can cause nausea, vomiting, headaches and irritation. Long-term effects include anemia, skin lesions, appetite loss and liver damage.
Sounds like they shouldn't be put out anywhere that kids or pets might go!