The Messenger of Allah (sal Allahu alaihi wa sallam) said: “Do not visit women in the absence of their husbands because Shaitaan circulates inside you like your blood.” [Tirmidhi]
Should it become necessary to visit a non-Mahram woman, it should be done so in the presence of her husband and the rules of Hijab (segregation) must be observed. When a non-Mahram man and woman are together alone, it often results in immoral conduct. This is why Allah (subhana wa ta’ala) has forbidden it in the Shariah of Islam to prevent corruption.
Take Allah’s advice!
“And Shaitaan will say when the matter is decided, ‘It was Allah Who gave you a promise of truth, I too promised but I failed in my promise to you. I had no authority over you except to call you but you listened to me; then reproach me not, but reproach your own souls. I cannot listen to your cries nor can you listen to mine. I reject your former act of associating me with Allah. For wrongdoers there must be a Grievous Penalty.’” [Quran: Surah Ibraheem, Ayat 22]