Firstly: One of the conditions for the marriage to be valid is the presence of wali. For a woman, it is not permissible to give herself in marriage without a wali. If marriage is conducted without a wali, it is considered as invalid.
If a woman is Muslim but her parents are not then it must be understood that there is no guardianship of a disbeliever over a Muslim woman in any circumstances.
The guardianship of a woman in case of marriage belongs to usbah or male relatives of the woman that are from the father's side. This includes father, the paternal grandfather, the son, brother and any paternal uncle who is steadfast on deen.
The relatives on mothers side are not usbah, they cannot be guardians in case of marriage. The maternal uncle and grandfather does not come under usbah. They cannot be guardians over marriage contract.
However, there are exceptions and some cases where maternal uncle may act as the guardian in case of marriage contract.
These cases are:
1. When the wali has appointed him to do that on his behalf.
2. When the marriage contract has already been done, and it has been officially documented in a Muslim country that follows the scholarly view that it is permissible for a maternal uncle to give his sister’s daughter in marriage, or the view that it is permissible for a woman to get married without a wali (guardian).
If a Muslim woman does not have any wali who can give her in marriage then that role may be filled by Muslim Qazi(Judge) if there is one. If the woman lives in the west and does not find a Muslim qazi or judge then the case falls on the director of the islamic centre. He has to act as the wali and give her in marriage.
If the case is that there is no Islamic centre around then the imam of local mosque or a scholar or a good Muslim of good character may give her in marriage.
Shaykh Ibn Baaz (may Allah have mercy on him) said:
If the woman is in a country where there is no wali – no brother, no father, and no paternal cousin – then the ruler takes the place of the wali; her wali is the ruler, because the Prophet (blessings and peace of Allah be upon him) said: “The ruler is the wali of the one who does not have a wali.” So the ruler takes the place of her wali and becomes her wali; he may give her in marriage or appoint someone else to give her in marriage.
If she is in a land where there is no (Muslim) ruler, qaadi or wali, as in the case of Muslim minorities in non-Muslim countries, then the director of the Islamic Centre may give her in marriage, if there is an Islamic centre, because his position is like that of the ruler for them. The director of the Islamic Centre may look at her case and give her in marriage to one who is compatible if she does not have any guardians of her own and there is no qaadi.
If the wali lives far away, he should have corresponded with outspoken to until he appoints someone as his proxy (wakeel). But if it is not known where he is, then the next closest wali takes his place; the one who is most closely related to him takes his place. If she has no wali except this absent one whose whereabouts is unknown, then the ruler takes his place.
And Allah knows best and is the source of strength.