Is it safe to be on a diet while pregnant?

No. Dieting during pregnancy is not advisable as it may harm you and your baby. A decrease in calories that results from dieting can place you at risk for nutritional problems during the pregnancy. One of the most commons problems that may be encountered are anemia and vitamin deficiencies. Eat a well balanced diet with fresh vegetables and fruits.
NO. Depends upon the kind of diet. If its is a weight loss diet the answer is no. It is for diabetes or some other medical probem like a gluten free diet, yes pregnancy is not a time to lose weight.