All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is no doubt that the wise Sharee’ah has urged those who want to marry to choose a pious woman, who is the religious one who is upon goodness, as it is most likely that the marital relationship will last with her, as she will protect her husband in her own self, his money, and will take care of his children.
Abu Hurayrah narrated that the Prophet said: "A woman is married for four things: for her wealth, her family lineage, her beauty and her religion. So choose the religious one, you will prosper." [Al-Bukhari and Muslim]
It is known that no one is perfect in being steadfast on the right path; everyone is somehow negligent. So, if a man does not find what he is looking for, then he should opt for one who is acceptable in her religion in general, in the sense that she is observing the obligatory acts of worship; the most important of which is the prayer and Hijab, and avoids grave major sins. Then, he should endeavor in teaching her religion, and educating her on faith and obedience. He should set an example for her, as this will help him in leading her to perfection. It is known that faith increases by acts of obedience and decreases with sins and evil deeds.
It should be noted that a Muslim should take into consideration the situation of the woman now and not look into her past. He should not investigate her past as there is no one who has never sinned. Besides, a person who repents from sin, Allah accepts his repentance.
If a person repents, he is required to conceal his sins, and the people should also conceal his sins.
The Prophet said: "All my nation is forgiven except those who commit sins openly."
The Prophet also said: "Whoever conceals the sins of a Muslim, Allah will conceal his sins in this worldly life and in the Hereafter." [Muslim]
Allah knows best.