O you who believe! Enter not houses other than your own, until you have asked permission and greeted those in them, that is better for you, in order that you may remember.
And if you find no one therein, still, enter not until permission has been given. And if you are asked to go back, go back, for it is purer for you, and Allah is All-Knower of what you do.
There is no sin on you that you enter (without taking permission) houses uninhabited (i.e. not possessed by anybody), (when) you have any interest in them. And Allah has knowledge of what you reveal and what you conceal.
Tell the believing men to lower their gaze (from looking at forbidden things), and protect their private parts (from illegal sexual acts, etc.). That is purer for them. Verily, Allah is All-Aware of what they do.
And tell the believing women to lower their gaze (from looking at forbidden things), and protect their private parts (from illegal sexual acts, etc.) and not to show off their adornment except only that which is apparent (like palms of hands or one eye or both eyes for necessity to see the way, or outer dress like veil, gloves, head-cover, apron, etc.), and to draw their veils all over Juyubihinna (i.e. their bodies, faces, necks and bosoms, etc.) and not to reveal their adornment except to their husbands, their fathers, their husband’s fathers, their sons, their husband’s sons, their brothers or their brother’s sons, or their sister’s sons, or their (Muslim) women (i.e. their sisters in Islam), or the (female) slaves whom their right hands possess, or old male servants who lack vigour, or small children who have no sense of the shame of sex. And let them not stamp their feet so as to reveal what they hide of their adornment. And all of you beg Allah to forgive you all, O believers, that you may be successful
Qur’aan, Chapter 24 (Al-Noor), Verses 27 to 31