No, it is not a good idea to use mothballs to keep rabbits away from your yard. It has chemicals that may leach into the soil and eventually get into the water supply. So, it is harmful to us, our pets, and other wildlife. Also, it is illegal in many US states.