Sodom has given its name to the now somewhat quaint-sounding term 'Sodomy', which originally meant a specific male homosexual sex act. Eventually it was expanded to mean any form of sexual expression which happened to be illegal, including things that married heterosexual couples do every day.
However, a close reading reveals the name to be a bit of a misnomer. To start off, Sodom is described simply as a 'wicked' place. Lot, Abraham's nephew, goes to live there to see if even one righteous person can be found there. The sexual theme starts when two disguised angels visit Lot. A mob, described as consisting of the men of the city, 'both young and old', attacks Lot's house and demands that Lot allow them to 'know' (in the language of the KJV) the two men. To 'know' is, of course, the famous KJV circumlocution for having sexual intercourse.
The next passage bears closer examination. Lot asks the mob to 'do' his two virgin daughters instead, but not the two guests, 'for ... they came under the shadow of my roof.' The rest of the story is well-known: divine wrath ensues, the mob is blinded, the cities of the plain are destroyed by fire and brimstone while Lot and his family flee, Lot's wife is turned to a pillar of salt because she looks back, and only Lot and his daughters escape. In an often ignored coda to this story, Lot's daughters have incest with him by getting him intoxicated, presumably to repopulate the country; a similar motif is found in the story of Noah. As in other Biblical narratives, even the heroes end up committing horrendous sins, driven by circumstances. But many ignore the entire context of the story in the rush to justify their own bigotry.
The sin of the city of Sodom was the originally considered to be the violation of the rights of Lot's guests. Defining the 'sin of Sodom' to be male homosexuality was a later interpretation, which was made by medieval Jewish and Christian writers, as a reaction to Pagan acceptance of homosexuality. Near Eastern hospitality, to this day, implies a responsibility to protect guests under one's roof. The fact that Lot was ready to make a huge sacrifice by offering up his virgin daughters to the mob instead of his guests underlines this.
There is abundant Haggadah, ancient Jewish folklore, which tells of the cruelty of Sodom to strangers, and their mistreatment of the poor and homeless. Among other stories, travelers are given gold but not food; when they starve to death, everything is stolen including the gold and the clothes off their backs, and their bodies are left to rot. One of Lot's unfortunate daughters is burned to death for the crime of giving a starving man food. Another woman who assists a poor man is smeared with honey and left to be stung to death by bees. Some of these stories are suffused with dark comedic twists. A poor man is assaulted and robbed. Eliezar, a servant of Abraham, is hit on the head when he intervenes. A judge rules that he must pay his assailant for medical treatment! (Bleeding was considered a surgical procedure). Eliezar then hits the judge on the head, drawing blood, and tells the judge to pay his fine. There are also numerous Biblical passages warning about mistreating strangers, (with the story of Lot being implied), for instance this one in the NT: "Be not forgetful to entertain strangers: for thereby some have entertained angels unawares."
Between the original concept of a violation of the law of hospitality and the medieval focus on a particular sexual act, there is an intermediate stage where Sodom was criticized for other reasons entirely. Where Sodom is mentioned in later books of the Tanach and in the New Testament, it is used as an example of a city which was corrupted by luxury, lacking in values such as charity and humility. Nowhere is this made clearer than in Ezekiel 16:48-50, where Ezekiel, speaking for 'the Lord God', enumerates the sins of Sodom: "Saith the Lord GOD...Behold, this was the iniquity of ... Sodom, pride, fulness of bread, and abundance of idleness ... neither did she strengthen the hand of the poor and needy. And they were haughty and committed abomination before me: therefore I took them away as I saw good".
Note that in this context 'abomination' means human sacrifice and idol worship, not shared tax breaks for long-term same-sex couples, or sexual practices you can see on cable after 10 o'clock. Furthermore, 'abomination' is at the end of the laundry list. The primary sin of Sodom, by this account, was that their society was materialistic, greedy and uncharitable. Social and economic justice is a thread that runs through the Hebrew Bible and the New Testament alike, and it is not difficult to extrapolate this to modern struggles for equality, such as those of LGBT people. When governmental and religious institutions and their leaders perpetuate oppression, it would not be farfetched to say that they are committing the actual sin of Sodom.