The Prophet, may peace be upon him, said, “A woman is sought for marriage for four reasons: money, familial lineage, beauty, and religiosity. Choose the one who has religion”. Then the Prophet used an expression (تربت يداك) that urges one to make this precious choice.
This Hadeeth means some of you people choose to marry a woman for her wealth, some of you for her lineage, some of you for her beauty, and some of you for her religion. Then the Prophet strongly urged to choose the woman who has religion.
The scholars said that this Hadeeth also applies for the woman; that is when choosing a husband to choose the one who has religion: a pious man, a man who takes care of his religion, who obeys God. The criterion of religiosity is to be considered first.