In Hinduism, renunciation of selfish desire leads to wisdom, and lust is one of the primary selfish desires. Avoiding lust is one of Hinduism's yamas, the restraints that Hindus observe in following Hindu dharma.
The Bhagavad Gita teaches that lust is a "mighty enemy (3:43)," a selfish desire that must be overcome in order to reach realization.
The Gita continues, "Pleasures conceived in the world of the senses have a beginning and an end and give birth to misery, Arjuna. The wise do not look for happiness in them. But those who overcome the impulses of lust and anger which arise in the body are made whole and live in joy. They find their joy, their rest, and their light completely within themselves. United with the Lord, they attain nirvana in Brahman (Bhagavad Gita 5:22-24)."
Hinduism also teaches that followers should live a life of brahmacharya, or divine conduct. This is usually interpreted as proper sexual conduct, or sexual purity. Being celibate when single, or maintaining a faithful marriage, are ways of practicing brahmacharya.
The Qur'an and the hadith, sayings of the Prophet, prohibit lust. Lust can impinge on a person's path to Allah, as the Qur'an states, "Follow not the lusts (of your hearts), lest ye swerve (Surah 4:135)." People who act on lust are not among the believers, as the Qur'an says, "Allah doth wish to Turn to you, but the wish of those who follow their lusts is that ye should turn away (from Him), far, far away (4:27)."
Muslims view the fast of Ramadan is a way of inhibiting lust. The month-long fast during daylight hours, helps Muslims subdue feelings of greed and lust, as they are not permitted to eat or have sexual intercourse during the fast. Fasting is considered a way of "cooling sexual passion," as Bukhari reports in the hadith: "Young men, those of you who can support a wife should marry, for it keeps you from looking at women (lit., lowers your gaze) and preserves your chastity; but those who cannot should fast, for it is a means of cooling sexual passion."
Fornication is sinful in Islam, and the hadith explain that fornication is not just the act of intercourse. Similar to Christianity, lustful glances or thoughts are also wrong. As Abu Hurairah reports in Sahih Muslim, the Prophet said, "The fornication of the eyes is to look with lust; the fornication of the tongue is to speak lustful things; the fornication of the hands is to touch with lust; the fornication of the feet is to walk towards lust; the fornication of the heart is to desire evil."
Similarly, Abu Musa reported in Tirmidhi that the Prophet said, "Every eye is adulterous (when it cast glances with lust on strange women) and when a woman perfumes herself and passes a company, she is such and such" [meaning adulterous].
Jewish tradition teaches that lust is natural and that both men and women have a sexual drive. Lust is considered a result of the yetzer harah, the evil inclination, which is part of every human being. The yetzer harah is necessary, as one Midrash explains, "were it not for the yetzer hara (the evil urge), a man would not build a house, take a wife, beget children, or engage in commerce." Lust, while stemming from the evil inclination, is necessary for sex, and sex is necessary for reproduction.
But reproduction is not the only reason to have sex, and Judaism teaches that sex for pleasure is a mitzvah, or good deed, though this is traditionally as long as sex is part of a marriage. Sex should not take place to satisfy lust alone, however, as the rabbis teach that sex that is purely lustful, and not out of love, cannot build a successful relationship.