Praise be to Allah.
Marriages that are regarded by the disbelievers as valid are approved by Islam and deemed to be valid, and the same consequences apply to them as to marriages that are sound according to sharee‘ah, such as legitimacy of children and inheritance between the spouses, and other rulings connected to valid marriage.
At the time of the Prophet (blessings and peace of Allah be upon him) many people became Muslim and he did not ask about the details or conditions of their marriages; rather he approved of them, which indicated that they were valid.
Ibn Qudaamah (may Allah have mercy on him) said: The marriages of the disbelievers are valid and are approved of if they become Muslim or if they refer to us for judgement, if the woman is one whom it is permissible to marry at the present moment, and the details and manner of the marriage contract are not to be examined and the marriage is not to be examined to see whether it conformed to the conditions for marriage among the Muslims, such as the presence of the wali (woman’s guardian) and witnesses, and the format of the proposal and acceptance, and so on. There is no difference of opinion concerning this among the Muslims. Ibn ‘Abd al-Barr said: The scholars are unanimously agreed that if two spouses become Muslim together at the same time, they remain married according to their original marriage, so long as they are not too closely related by blood or through breastfeeding. People became Muslim at the time of the Messenger of Allah (blessings and peace of Allah be upon him) and their wives also became Muslim, and their marriages were approved of; the Messenger of Allah (blessings and peace of Allah be upon him) did not ask them about the conditions of their marriage or how it was done. This is something that is known through mutawaatir reports and is something that is well known to all Muslims, so it is certain. But the marriage may be checked in some ways. If the woman is one whom it is permissible for him to marry in the first place, the marriage is approved, but if she is one whom it is not permissible for him to marry in the first place, such as a mahram (close relative) through blood or otherwise, or because she is in ‘iddah, an apostate, an idol worshipper, a Magian, or one whom he has thrice divorced, then it is not to be approved. If they got married during the ‘iddah and they became Muslim after the ‘iddah ended, then it is to be approved, because it is permissible for him to marry her in principle.
End quote from al-Mughni, 7/115
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: Marriages of the disbelievers come under the same rulings as marriages of Muslims with regard to consequences such as zihaar, li‘aan, talaaq, attribution of lineage, and so on.
If the marriage is valid according to Islamic sharee‘ah, then it is valid. If it is invalid according to Islamic sharee‘ah, then it may be approved subject to two conditions:
(i) that they regarded it as valid according to their own laws
(ii) that they did not refer to us for judgement.
If they do not regard it as valid, then they should be separated. If they refer to us for judgement, we should examine the case. If that is before the marriage contract has been done, then we should do it according to our laws. If it is after the marriage contract has been done, then we should find out whether the woman was permissible (for him to marry), in which case we should approve the marriage, but if she was not permissible then we should separate them. The evidence for these things is the fact that disbelievers became Muslim at the time of the Prophet (blessings and peace of Allah be upon him) and he left those who were married on the basis of their marriages during the Jaahiliyyah and did not discuss the matter. This indicates that (such marriages) are to be left as they are.
End quote from ash-Sharh al-Mumti‘, 12/239
Based on that, the children who are born to non-Muslims, if they were born within a marriage that they believe is a valid marriage, are indeed their children and attributing them to them is valid.
But if they did not believe that this was a proper marriage; rather it was a kind of friendship and love without marriage, then these are illegitimate children, not legitimate.
But if the zaani attributes them to himself and regards them as his children, then they are his children and are to be attributed to him.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was asked about the problem of zina (fornication or adultery) which few of our brothers and sisters were free of before they became Muslim; and many children resulted from these relationships. With regard to the children who are born as a result of zina (fornication), is it obligatory for their fathers who have become Muslim and who were not married to the mothers to spend on their maintenance?
He replied: With regard to these people who had intercourse when they were still disbelievers, if they believed that this intercourse occurred in the context of a marriage contract that they thought was valid, even though it is invalid according to sharee‘ah, the marriage contract is valid and the children belong to that man. For example, when he was still a disbeliever, a man proposed to a woman that he should be her husband and she agreed, and they thought that this was a marriage contract, then the man and woman became Muslim. We say: Your marriage is still valid and there is no need to repeat the marriage contract, and any children that you had are your children, unless the wife is not permissible for the husband in Islam. An example of that is if he was a Magian and married his sister, as the Magians regard it as permissible to marry mahrams (close relatives). If he married his sister when he was a disbeliever, then he became Muslim and she became Muslim, they must be separated because the woman is not permissible for the man. With regard to the group of people you mention we say: If they believe that what they did of having relationships with these women was a marriage, then it is not zina and the children belong to them. But if you believed that it was zina and you attributed these children to yourself when you were still a disbeliever -- i.e., the zaani said: These are my children -- then they are his children, so long as there is no one to dispute with him on this issue. But if they did not attribute these children to themselves, then they are not their children.
With regard to maintenance, if we determine that they are their children, then they are obliged to spend on their maintenance; if we have not determined that, then they are not obliged to spend on their maintenance.
End quote from Fataawa Noor ‘ala ad-Darb.