Listed below are some safe drugs and some harmful drugs in pregnancy. Since it is not a complete list, patients are advised to check the drug label of each drug before taking them during pregnancy.
Drugs Considered Safe in Pregnancy: 
Some antibiotics namely Amoxycillin, Ampicillin, Cephalosporins, Erythromycin (not estolate)

Levothyroxine

Acetaminophen

Folic Acid and Vitamin B6

Methyl dopa, and hydralazine

Insulin

Heparin
Drugs Contraindicated in Pregnancy: Some drugs in
category X that are contraindicated in pregnancy and their effects on the fetus are listed below:

Vitamin A and its derivatives - Accutane(Isotretinoin), Acitretin, Etretinate - Birth defects, miscarriage

Thalidomide – Seal like limbs and other defects

Diethylstilbestrol – Causes cancer of the vagina or cervix in female children during their teenage years

Warfarin – Causes multiple birth defects

Danazol – Causes malformations in sex organs of female fetus

Simvastatin and other statins – Cholesterol is needed for fetal growth and its reduction by statins could harm the fetus

Finasteride – Though finasteride is normally not prescribed to women, pregnant women should not handle broken or crushed tablets since it can get absorbed through the skin and affect the sex organ development of the male fetus.

Testosterone - Can cause birth defects

Oral contraceptives- Can cause birth defects

Dutasteride - Affects the sex organ development of the male fetus.

Methotrexate – Causes cleft palate along with multiple defects
Some known side effects of drugs during pregnancy are listed below: 
Tetracyclines - Get deposited in fetal bones and retard their growth, also affect teeth causing them to be discolored and deformed

Chloramphenicol – Gray baby syndrome

Isoniazid - Neuropthy and seizures in fetus, liver damage in mother

Sodium Valproate – Defects of the nervous system

ACE inhibitors – Growth retardation, birth defects, fetal death

Lithium – Affects fetal thyroid, heart beside causing other abnormalities

Phenytoin – Cleft lip/ palate along with other deformities

Anti convulsants - Trimethadione, Valproic acid, Carbamazepine – Multiple birth defects

Androgens – Multiple defects
During the
last 3 months of pregnancy, drugs crossing the placental barrier may interfere with the vital functions of the fetus E.g.:

Morphine - If the mother is given morphine during labor, fetal asphyxia can occur

Anti-coagulants - May cause fatal bleeding in the newborn

Radioactive iodine therapy - A cretin may be born due to radioactive iodine therapy

Anti thyroid drugs - may produce goiter, which can lead to face presentation

Sulfonamides – may increase bilirubin levels leading to kernicterus