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.
Allah Says (what means): {And do not spy or backbite each other.} [Quran 49: 12]
Abu Hurayrah narrated that the Prophet said: “Beware of suspicion, for suspicion is the worst of false tales, and do not look for the others' faults, and do not spy on one another, and do not be jealous of one another, and do not desert (stop talking) to one another, and do not hate one another. And be Allah's slaves and brothers.” [Al-Bukhari and Muslim]
Allah and his Prophet forbade spying and looking for the faults of Muslims, instead we are ordered to think well of them and to cover them. However, if a person wants to be alone with a woman for the purpose of adultery, spying is permissible as approved by the scholars, to protect the woman from indulging in illegal sex.
Imam Ibn Haja wrote in the explanation of Saheeh Al-Bukhari: “Spying to save a life, such as if one comes to know from a trustworthy person that someone is in seclusion with someone to kill him unjustly, or with a woman to have illegal sex with her, then spying is permissible to prevent harm before it is too late. Such cases are exempted from the general prohibition of spying. This is reported from Al-Mawardi by Imam An-Nawawi who considered it a good opinion.”
If one knows about a woman that she wants to have illegal sex with a man, then he/she should exhort her, advice her to avoid it, and should cover her. If she makes her sin public and does not feel shame, then it is compulsory to inform the one who can deter her from this act.
Allah knows best.