As promised, here’s a brief history of the modern interpretation of the Sodom story. To the best of our knowledge, the first time Sodom is linked to homosexuality is in several of the works known as the pseudepigrapha. The pseudepigrapha were all written by Jewish authors in the intertestamental period (approximately 300-50 B.C.), and were apparently well known in New Testament times.
The first known work to suggest that Sodom's sin was sexual in nature was the Book of Enoch, which associated Sodom with the Watchers (the angels who took on human form and sired children during the pre-Flood era, and were imprisoned for their sin). The Testaments of the Twelve Patriarchs picks up on this theme in Naphtali, who appeals to Enoch and mentions how the people of Sodom "changed the order of their nature" (again in association with the Watchers). At this point in time the focus was entirely on the Sodomites' apparent interest in having sex with angels.
While some authors in this time period began to pick up on this new interpretation of the Sodom story, other works (most notably the Book of Wisdom, which appears in some biblical canons) continued to focus on the themes of inhospitality and mistreatment of the poor that the prophets had emphasized. Then, sometime in the last century before Christ, the theme shifted again. The book of 2 Enoch explicitly links Sodom with the Roman practice of pederasty, and later copies of the Testaments of the Twelve Patriarchs begin to imply a link between Sodom and homosexual behavior.
So what happened? Consider the times that these rabbis were writing in. The relatively Jew-friendly Persian empire had been overthrown by Alexander the Great, and his successors lost no time introducing Greek culture and philosophy into Palestine and the other former Persian provinces. Then, adding insult to injury, Antiochus Epiphanes came along and desecrated the temple (in fulfillment of Daniel's prophecies). At this point the Jews revolted, and under the leadership of Judas Maccabeus and his brothers succeeded in gaining their independence from the Greeks, only to be overrun by Rome a short time later.
So what would the Jews have thought of their oppressors? The Greeks were dirty pagans with religious practices scarcely better than the Canaanites that God had ordered the Israelites to exterminate in centuries past. Their entire culture was degenerate in the eyes of the Jews. To top it all off, not only did they engage in the same kinds of "sacred sex" rituals that were condemned in Leviticus, they tolerated some homosexual relationships outside of a religious context (something the Canaanites never did). And the Romans were no better. Not only did they adopt and promote the Greek culture they had recently absorbed, but they openly embraced the deplorable practice of pederasty (an adult man in a sexual relationship with a teenage or preteen boy).
Is it any wonder then that the religious leaders of the day, already hard pressed to hold back the attempted Hellenization of Jewish culture, would turn their attention to a practice that most of their followers would instinctively detest? What better way to strike back at Greco-Roman culture than by appropriating the Sodom story and giving it a new twist as a condemnation of the homosexual activity going on around them?
And so this interpretation of Sodom began to gradually supplant the traditional understanding of the story. Jesus was undoubtedly exposed to this viewpoint in his youth - which makes it all the more striking that he ignores it completely and brings the Sodom story back to its original meaning by using Sodom in his condemnation of the inhospitality and rejection of the truth his disciples encountered in some of the towns he sent them to.
Throughout his career Jesus was continually offending the various factions of the time: the Pharisees, the Sadducees, the Essenes and the Zealots all had reasons to hate him. And so Jesus gives them one more reason by effectively dismissing the interpretation of Sodom promoted by the later pseudepigraphal authors (who were the direct predecessors of the Pharisees Jesus sparred with) and turning the story back around to condemn them. Them! The Pharisees were the champions of godliness who had fought for generations to preserve Judaism from the corrupting influences of Macedonia and Rome, and Jesus was comparing them to the wicked men of Sodom! No wonder they wanted him dead.
Yet even in New Testament times this new idea had not completely supplanted the older traditions. Jude (who is often appealed to as support for the idea that Sodom's sin was homosexuality) cites the book of Enoch several times, and refers to Sodom within the context of humans overstepping their boundaries where angels are concerned. Peter, in turn, echoes Jude's use of the Sodom story while speaking more generically about Sodom's immorality; neither writer picks up the homosexual slant that would have been favored by some of their contemporaries. The other New Testament authors are largely silent on the matter.
Although this is a very brief (and probably incomplete) overview of a subject that scholars have written hundreds of pages about, my hope is that it provides a solid starting point for those interested in understanding how the church came to adopt such a skewed understanding of the Sodom narrative.