This question is actually the second of three very related questions:
- Can a man talk to a woman whom he can legally marry (non-Mahram)?
- Can non-Mahram men and women be friends?
- Can a non-Mahram man and a non-Mahram woman be alone together?
The reason these three questions are related, and the reason this is an issue at all, is because of the intensity of the physical attraction between men and woman, which, if not controlled, almost certainly will lead to sex. Sex between men and women who are not married to each other is a major sin in Islam. The Quran calls it a debauchery and lists it as one of the very few offenses for which it has set a legal punishment.
To answer the third question above, the Prophet (PBUH) made it unambiguously clear that the answer is no. He said, as narrated by Ibn Abbaas (RA), “Let not a man be alone with a woman, except if with them is a Mahram (a man whom she cannot marry)”, authenticated and reported by both Al-Bukhaari and Muslim.
Why is that? After all, if people are respectful of each other and are God-conscious, they can be trusted not to engage in sin, right?
Wrong! The best people sin, because they’re human and because Satan has taken upon himself to seduce them into sin with whatever means available to him. You will hear people say, in justification of falling into the sin of fornication, “We did not plan this. It just happened!” They did not plan it, but it did not just happen! It was what was sure to happen.
To illustrate this point further, think of this parable. You are going to walk down Baker Street to get to a grocery store. I know that there is a great deal of construction work being done on Baker Street and that there are no warning signs. I know that even if you were careful where you step, you are almost certainly going to fall into one of the many holes there. If you decide to ignore my advice and take Baker Street anyway, and then fall in one of its pits, whom would you blame?
Therefore, if you can say with complete confidence that being face-to-face friends with a woman will never result in the two of you having sex outside matrimony, then the answer to the second question is yes!
But can you? The odds are against you.
If the friendship is not face to face, then the odds improve considerably. That is because a man is visually stimulated.
Bear in mind too that human emotions, such as love and loneliness, and desires, such as lust, often develop in an irrational way.
Similarly, we can answer the first question: if talking one-on-one to a woman will never lead to the two of them having sex, then the answer to that question is yes. Many scholars have ruled against it though, because they fear the worst, do not trust human nature, or simply to be on the safe side.
So, in summary, you can be friends with a woman whom you legally can marry if you can fulfill all of the following conditions:
- Neither of you will ever engage in a suggestive dialog,
- Neither of you will ever make an advance at the other, and
- The two of you will never be alone together anywhere.
That being said, knowing human nature, especially if you are a young man, and knowing the constant whispering of Satan, the above conditions practically rule it out.