One should not disclose one’s past sins to a prospective spouse. Allah has covered a person’s sins, and it is not anyone’s business to seek to lift Allah’s cover of confidentiality. Thus, it is unbecoming of anyone to probe into someone’s sinful past.
However, one must make a definite exception to the above rule. If one is HIV-positive or has a sexually transmitted or other contagious disease, it is incumbent upon one to disclose it to the prospective spouse [without adding details of one’s past sex life]. Failure to do so is a most heinous offense, as it would most likely expose a spouse to unnecessary harm, which is not tolerated in Islam.
Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states: According to the best teachings of Islam, we are not allowed to dig into the past of other people, including our own prospective partners or others for that matter. The only exception, however, is when it entails dire consequences impacting on the present; that would be the case if a person had had a permissive lifestyle in which there was a risk of contracting a sexually transmitted disease [or if a contagious disease or HIV was contracted by other means]. In this case it becomes obligatory on him or her to divulge the same to a prospective partner. By failing to divulge the same in such a case, he or she is committing a major sin, for we are not allowed to endanger the health of others through our reckless behaviour.

If, however, such risks have been absolutely ruled out, and the person who had a bad past has come clean of the same and has been leading a pure and chaste life, then there no obligation to divulge the past. For as the Prophet (peace and blessings be upon him) taught us, we are not to uncover what Allah has kept hidden. Nor is it Islamic on the part of a prospective partner to dig into someone’s past he or she has no stake in.
Having said this, however, I must point out the following: If this issue has already become a sore point between both of you and doubts are creeping, then it is advisable to turn down such a proposal; for it is more than likely that if it does not pose a problem right away, in the long run it may prove a sticky thorn in your relations later. Marriage break-ups caused by frictions and tensions of this sort are so common among couples; therefore, we are best advised to avoid pursuing such proposals from the outset.