Diabetes during pregnancy increases the risk of birth defects, such as congenital heart disease and spina bifida, by four-fold, researchers say.
National guidelines already recommend having good control over blood sugar levels before trying to conceive.
Both Type 1 diabetes, which tends to appear in childhood, and Type 2 diabetes, largely as a result of diet, lead to problems controlling the amount of sugar in the blood.
This is known to cause problems in pregnancy, such as birth defects, miscarriage and the baby being overweight due to too much sugar.
There is concern that rising levels of diabetes, particularly Type 2, could make the issue worse.
For the new study, researchers at Newcastle University analysed data from 401,149 pregnancies in the northeast of England between 1996 and 2008 - 1,677 women had diabetes.
The risk of birth defects went from 19 in every 1,000 births for women without pre-existing diabetes to 72 in every 1,000 births for women with diabetes.
Their report, published in the journal Diabetologia, said that sugar levels in the run-up to conception were the "most important" risk factor that could be controlled.
"Many of these anomalies happen in the first four to six weeks," Dr Ruth Bell from Newcastle University, the lead researcher, told the Media.
She said the number of pregnancies with poor sugar control were "more than we would like".
"It is a problem when the pregnancy is not intended or when people are not aware they need to talk to their doctors before pregnancy," she said.
Guidelines from the National Institute of Health and Clinical Excellence say women should reduce their blood sugar levels to below 6.1 percent before trying to have a baby.
"The good news is that, with expert help before and during pregnancy, most women with diabetes will have a healthy baby," Dr Bell said.
"The risk of problems can be reduced by taking extra care to have the best possible glucose control before becoming pregnant," she added.