Praise be to Allaah.
This question includes two issues:
1 â The ruling on looking at women
2 â Does looking at women invalidate the fast or require expiation (kafaarah)?
With regard to the ruling on looking at women, it is haraam because Allaah has commanded the believers to lower their gaze. Allaah says (interpretation of the meaning):
âTell the believing men to lower their gaze (from looking at forbidden things), and protect their private parts (from illegal sexual acts)â
This was also enjoined by His Messenger (peace and blessings of Allaah be upon him). It was narrated that Jareer said: I asked the Messenger of Allaah (peace and blessings of Allaah be upon him) about a sudden accidental glance. He said, âAvert your gaze.â Narrated by Abu Dawood, al-Nikaah, 1836; classed as saheeh by al-Albaani in Saheeh Abi Dawood, no. 1880.
Hence it is obligatory to follow the command of Allaah and His Messenger. Allaah says (interpretation of the meaning):
âAnd let those who oppose the Messengerâs (Muhammadâs) commandment (i.e. his Sunnah legal ways, orders, acts of worship, statements) (among the sects) beware, lest some Fitnah (disbelief, trials, afflictions, earthquakes, killing, overpowered by a tyrant) should befall them or a painful torment be inflicted on themâ
See also questions no. 21784, 20229
With regard to the second issue, which is the effect of looking at non-mahram women on one's fast, the Standing Committee was asked about this and they replied: It does not invalidate the fast, but he must lower his gaze. Fataawa al-Lajnah al-Daaâimah liâl-Iftaâ, 10/274
So the Muslim, especially one who is fasting, must avert his gaze from them (women) so that his fasting will not be undermined by haraam things. Whoever does such a thing must repent to Allaah.