Can a single woman be accused and convicted of fornication on the strength of her falling pregnant?
If a woman confesses that her baby was born from an illegal relationship or in case four witnesses of impeccable character testify that she had committed adultery – meaning that they were eye-witnesses to the sexual penetration – then she will be subject to conviction in the Islamic courts. Likewise, if a man confesses to adultery or four witnesses of impeccable character testify that he had committed adultery then he will be subject to the legal punishment. She is no different than a man in this regard.
In case there are no witnesses and no confession then the woman will not receive punishment just because of pregnancy. Women can fall pregnant without committing illegal sexual intercourse. A woman could be raped or coerced. In this case, she is a victim and not the perpetrator of a crime.
Therefore, she cannot be punished or even accused of misconduct merely on the strength of her falling pregnant. This opinion is held by many people of knowledge. Ibn Qudâmah said in his book al-Mughnî:
If a woman becomes pregnant without having a husband or a master, she may not be punished and, in stead, she should be asked about it, if she claimed that she was coerced into it or that she committed adultery under dubious circumstances, or if she simply does not confess adultery then she will not be punished. This is the saying of Abu Hanîfah and al-Shâfi`î ,because she may be pregnant as a result of a forceful intercourse or dubious circumstances. Punishment will be abandoned in case suspicion exists. It is well known that a woman could become pregnant without engaging in true intercourse. The woman may become pregnant if sperm is manually inserted into her vagina. This would explain how a virgin becomes pregnant.This is clearly the correct and most just ruling on the matter
In conclusion, adultery/fornitcation can ONLY be prosecuted if there are four pious witnesses (which is VERY HARD TO FIND) or a personal confession (which by the way is discouraged because the Prophet, peace be upon him, told everyone to keep their sins provate).