There are a few potential causes of yellow discharge during pregnancy, including: An infection. Sometimes, yellow discharge is caused by an infection like vaginosis, trichomoniasis or a yeast infection.