The majority of veterinarian-approved dewormers, or wormers, are safe to use on a nursing mama dog. Deworming her and her babies is the right thing to do, especially if she hasn't been getting or has missed monthly parasite prevention doses.
Puppies should be given dewormer at the same time as mama to limit the risk of kennel infection and reinfection. Your veterinarian can recommend a type of dewormer best suited to your situation after you've given him details.
Entire Life Cycle
Dewormers kill the adult parasites so your dog will need another dose to take care of worm larvae that survived the first dose. In most cases the dewormer is administered three weeks later. In the case of puppies, the recommended dosing ages are 2 weeks of age, then 4 weeks, then 6 weeks, until the puppies are on regular monthly prevention.
If your dog or puppies have accidents in the house, you'll need to sterilize the area with steam or bleach to prevent reinfection. Don't walk barefoot in the yard where your dog and puppies use to go to the bathroom. This will help prevent you from getting worms as well.
Long Term Protection
Providing a monthly preventative is one of the most important things you can do for your dog's health. Parasites aren't just a hassle, they can do a lot of damage, too. It's easier, and cheaper in the long run, to prevent it from happening. With a surfeit of options available, you should talk to your veterinarian about the best kind of preventative for your dogs and your lifestyle.