Rasul Allah (sal Allahu alaihi wa sallam) said, “Sight is a poisonous arrow of the devil. Whosoever, whether male or female, protects himself or herself from evil glances, will be granted a sweet Eman (faith) which will please his/her heart.” [Tabrani]
The heart is like a container that you can keep filling with Eman. But each glance at a non-mahram makes a hole in this container of Eman. Like a bucket full of holes cannot hold water, so also does Eman keep pouring out of the heart of the person who does not restrain his/her glances to what Allah (subhana wa ta’ala) has permitted looking at.
The disease of checking out the opposite gender has unfortunately become quite common. Allah (subhana wa ta’ala) calls it an act of the devil that causes Eman to turn sour. Therefore, if you would like to taste the true sweetness of Eman, you need to guard your glances and not look at what Allah (subhana wa ta’ala) has prohibited.
One needs to protect himself/herself from allowing their aurah (parts of the body men and women are required to keep covered and hidden from the eyes of others) to be seen by others. As we would wear armor if physical arrows were assaulting us, so we should wear concealing clothes to protect ourselves from the poisonous arrows of the Shaytaan. These do not attack our physical body, but they attack our soul and tear holes in our faith.