Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
Is friendship between men and women permissible?
If what is meant by friendship is mixing between men and women and them joking with each other and looking at each other then there is no doubt that is impermissible. What is permissible is for them to seek to benefit each other and benefit from each other and for them to love each other for the sake of Allah, without shaking hands, mixing, without a man being alone with a woman and without them looking at each other in a way that is impermissible. Allah says: The Believers, men and women, are protecting friends, one of another. He thus legislates ties of love, friendship and allegiance between male and female believers, without anything prohibited entering. If people consider friendship to be doing things which are prohibited, then their understanding is warped and they have no proof to support their case.