All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If this woman became pregnant out of Zina (fornication or adultery), then it is not permissible to congratulate her for this or when she gives birth to the baby, as this is being content with the sin which she committed.
However, if she did not become pregnant out of Zina, then the scholars differed in opinion about the permissibility of congratulating non-Muslims on the occasion of a newborn baby and the like. The most preponderant opinion is that this is permissible if there is a preponderant benefit, like softening their hearts hoping that they would embrace Islam and the like. This is the chosen opinion by Shaykh Ibn Taymiyyah .
For more benefit, please refer to Fatwa 88293.