Thank you for writing in and sorry to hear about the loss of your dog's puppies. It is very unfortunate.
Unfortunately, as with most things, there are a multitude of reasons behind the occurrence you have described. Birth defects can occur because of genetic causes, adverse conditions during pregnancy or a combination of both. I will attempt to explain a few possibilities.
1. It could be that there were born pre-mature: this is the simplest and most commonly occurring reason. The gestation length for dogs average 63 days. How long was it since your dog had been mated? How old is she and has she had litters before?
2. Genetic disorders: This could be another reason why the birth defects occured. The chances of this being the case are much higher with pure-bred dogs, especially those that have been mated with their own brothers/fathers/close relatives. This is known as 'inbreeding' and it is a very dangerous phenomenon and must be avoided at all costs.
3. Nutrition related disorders: Pregnancy is a highly demanding phase and there are many micro and macro nutrients that are essential during this time for proper development of the fetuses. If you think this may have been the case, please speak to your local veterinarian about a diet specific for a pregnant dog.
4. Teratogens: These are toxic agents that disrupt fetal development. There are a huge range of known teratogens and these include common insecticides, fungicides, drugs, plant toxins, infections etc. Could your dog have been exposed to any such thing during her pregnancy?
I hope this information helps. What breed is your dog? If she is a pure-bred I may be able to help you further (if it a genetically linked issue, that is). I hope that she is doing okay and that she is able to conceive successfully in the future.