What Islam prohibits in the sphere of sex includes looking at a member of the opposite sex with desire; for the eye is the key to the feelings, and the look is a messenger of desire, carrying the message of fornication or adultery.
This is why Allah Almighty has commanded the believing men and the believing women alike to lower their gazes together with His command to guard their sexual parts: (Tell the believing men that they should lower their gazes and guard their sexual organs; that is purer for them. Indeed, Allah is well-acquainted with what they do. And tell the believing women that they should lower their gazes and guard their sexual organs, and not display their adornment, except that which is apparent of it; and that they should draw their head-coverings over their bosoms, and not display their adornment except to their husbands or their fathers or their husbands’ fathers, or their sons or their husbands’ sons, or their brothers or their brothers’ sons or their sisters’ sons, or their women, or those whom their right hands possess, or male servants who lack sexual desire, or children who are not aware of women’s nakedness; and that they should not strike their feet in order to make known what they hide of their adornment.) (An-Nur 24: 30-31)
Several divine injunctions are contained in these two verses. Two of them pertain to both men and women, namely, the lowering of the gaze and the guarding of the sexual organs, while the rest are addressed exclusively to women.
A difference is to be noted here between the expressions, ‘lower their gazes’ and ‘guard their sexual organs,’ signifying that while the sexual organs must be totally guarded without any leeway, the lowering of the gaze is only partial, because necessity and the general interest of the people require that some looking at members of the opposite sex be allowed.
‘Lowering the gazes’ does not mean that in the presence of the opposite sex the eyes should be shut or that the head should be bowed toward the ground, since this would be impossible; in another place the Qur’an says, ‘Lower your voice’ (Luqman 31: 19), which does not mean sealing the lips. Here, ‘lowering of the gazes’ means to avert one’s gaze from the faces of the passers-by and not to caress the attractive features of the members of the opposite sex with one’s eyes. The Prophet (peace and blessings be upon him) told `Ali ibn Abi Talib, ‘Ali, do not let a second look follow the first. The first look is allowed to you but not the second.’
The Prophet (peace and blessings be upon him) considered hungry and lustful looks at a person of the opposite sex as ‘the zina (adultery or fornication) of the eye,’ according to his saying, ‘The eyes also commit zina, and their zina is the lustful look.”
He termed the lustful look zina because it gives sexual pleasure and gratification in an unlawful way. This is also what Jesus (peace and blessings be upon him) is reported to have said in the Gospel of Matthew: You have heard that it was said, ‘You shall not commit adultery’. But I say to you that everyone who so much as looks at woman with evil desire for her has already committed adultery with her in his heart. (Matt. 5:2728)
Indeed, such hungry and lustful looks are not merely a danger to chastity but they also result in agitation of the mind and disturbed thoughts.
May Allah empower me and all who want to purify their hearts.