Islam teaches that homosexual acts are sinful and punishable by God. This teaching comes not from human beings, but from the Creator of all humans. God tells us in His own words how He punished the people of Lot for their homosexual behavior. The story of the prophet Lot, on whom be peace, finds mention in several Qur'anic passages (see especially Qur'an 26:160-175). From these passages we learn that God saved Lot and the righteous ones of his family, and rained on the rest a shower of brimstones, so they were utterly destroyed. This is mentioned in the Qur'an not only for the sake of information, but mainly to serve as a warning to anyone who dares to repeat such acts.
Muslims believe that every human action leads to consequences. Good actions entail good results, and evil actions entail evil consequences. Some of these consequences may not become known for many years after a certain action. The consequences of some actions will become manifest only after death when one enters a new, everlasting life. To understand this point, consider the fact that often people contract a deadly disease which is diagnosed many years after the fact. A common mistake among humans is that if they do not see any negative consequences for their actions they consider their actions harmless. Human experience has taught us that a source of superior knowledge can be of tremendous benefit to humans. In the past, doctors unwittingly gave blood tainted with the AIDS virus to thousands of patients. If a source of superior knowledge had warned us beforehand, and we paid attention to that warning, we could have saved many people from this deadly disease.
God, the source of all knowledge, warns us of His punishment if people perpetrate homosexual acts. Let us pay attention and learn the easy way. Some will say that a person may be born with homosexual tendencies. We say that everyone is a free agent. God lays before us two paths and has given us knowledge of where these paths lead. One is the path to which the devil calls us. We must avoid that. Another is the path leading to paradise. We must stick to that one. Everyone experiences evil prompting from time to time. We must resist those with all our might. If one feels a tendency to do something that God prohibits, he or she should seek help from a community of loving, caring believers who would understand his or her difficulty and help him or her overcome it.
A common ploy of the devil is to convince people that they cannot avoid sin. Then they do not even try. But God promises that the devil can have no lasting power over those who sincerely seek God (see Qur'an 15:42). Finally, our bodies are given to us in trust from God. One should not use his or her body contrary to the user guide provided by its Maker. Consenting adults also need God's consent.