During pregnancy, women usually ingest numerous vitamins and minerals that can lead to teeth discoloration. Some supplements are extremely rich in iron and can easily cause teeth discoloration.
Cosmetic procedures like teeth whitening aren’t supposed to cause any harm or convey any risk during pregnancy. So it’s an option to consider, although you should always check with your dentist before requesting any procedure.