The truth about Sodom and Gomorrah has nothing to do with homosexuality. It has everything to do with inhospitality and cruelty to foreigners and strangers.
Look at the following verse:
Jos 10:13 And the sun stood still, and the moon stayed, until the people had avenged themselves upon their enemies. [Is] not this written in the book of Jasher? So the sun stood still in the midst of heaven, and hasted not to go down about a whole day.
Notice the reference to the Book of Jasher. I found this book on a website. Jasher 18 and 19 gives a full account of what happened in Sodom and Gomorrah. Here is a few verses:
1. And when a poor man came to their land they would give him silver and gold, and cause a proclamation in the whole city not to give him a morsel of bread to eat, and if the stranger should remain there some days, and die from hunger, not having been able to obtain a morsel of bread, then at his death all the people of the city would come and take their silver and gold which they had given to him.
2. And those that could recognize the silver or gold which they had given him took it back, and at his death they also stripped him of his garments, and they would fight about them, and he that prevailed over his neighbor took them.
3. They would after that carry him and bury him under some of the shrubs in the deserts; so they did all the days to any one that came to them and died in their land.
4. And in the course of time Sarah sent Eliezer to Sodom, to see Lot and inquire after his welfare.
5. And Eliezer went to Sodom, and he met a man of Sodom fighting with a stranger, and the man of Sodom stripped the poor man of all his clothes and went away.
6. And this poor man cried to Eliezer and supplicated his favor on account of what the man of Sodom had done to him.
7. And he said to him, Why dost thou act thus to the poor man who came to thy land?
8. And the man of Sodom answered Eliezer, saying, Is this man thy brother, or have the people of Sodom made thee a judge this day, that thou speakest about this man?
9. And Eliezer strove with the man of Sodom on account of the poor man, and when Eliezer approached to recover the poor man’s clothes from the man of Sodom, he hastened and with a stone smote Eliezer in the forehead.
10. And the blood flowed copiously from Eliezer’s forehead, and when the man saw the blood he caught hold of Eliezer, saying, Give me my hire for having rid thee of this bad blood that was in thy forehead, for such is the custom and the law in our land.
11. And Eliezer said to him, Thou hast wounded me and requirest me to pay thee thy hire; and Eliezer would not hearken to the words of the man of Sodom.
12. And the man laid hold of Eliezer and brought him to Shakra the judge of Sodom for judgment.
13. And the man spoke to the judge, saying, I beseech thee my lord, thus has this man done, for I smote him with a stone that the blood flowed from his forehead, and he is unwilling to give me my hire.
14. And the judge said to Eliezer, This man speaketh truth to thee, give him his hire, for this is the custom in our land; and Eliezer heard the words of the judge, and he lifted up a stone and smote the judge, and the stone struck on his forehead, and the blood flowed copiously from the forehead of the judge, and Eliezer said, If this then is the custom in your land give thou unto this man what I should have given him, for this has been thy decision, thou didst decree it.
15. And Eliezer left the man of Sodom with the judge, and he went away.
16. And when the kings of Elam had made war with the kings of Sodom, the kings of Elam captured all the property of Sodom, and they took Lot captive, with his property, and when it was told to Abraham he went and made war with the kings of Elam, and he recovered from their hands all the property of Lot as well as the property of Sodom.
17. At that time the wife of Lot bare him a daughter, and he called her name Paltith, saying, Because God had delivered him and his whole household from the kings of Elam; and Paltith daughter of Lot grew up, and one of the men of Sodom took her for a wife.
18. And a poor man came into the city to seek a maintenance, and he remained in the city some days, and all the people of Sodom caused a proclamation of their custom not to give this man a morsel of bread to eat, until he dropped dead upon the earth, and they did so.
19. And Paltith the daughter of Lot saw this man lying in the streets starved with hunger, and no one would give him any thing to keep him alive, and he was just upon the point of death.
20. And her soul was filled with pity on account of the man, and she fed him secretly with bread for many days, and the soul of this man was revived.
21. For when she went forth to fetch water she would put the bread in the water pitcher, and when she came to the place where the poor man was, she took the bread from the pitcher and gave it him to eat; so she did many days.
22. And all the people of Sodom and Gomorrah wondered how this man could bear starvation for so many days.
23. And they said to each other, This can only be that he eats and drinks, for no man can bear starvation for so many days or live as this man has, without even his countenance changing; and three men concealed themselves in a place where the poor man was stationed, to know who it was that brought him bread to eat.
24. And Paltith daughter of Lot went forth that day to fetch water, and she put bread into her pitcher of water, and she went to draw water by the poor man’s place, and she took out the bread from the pitcher and gave it to the poor man and he ate it.
25. And the three men saw what Paltith did to the poor man, and they said to her, It is thou then who hast supported him, and therefore has he not starved, nor changed in appearance nor died like the rest.
26. And the three men went out of the place in which they were concealed, and they seized Paltith and the bread which was in the poor man’s hand.
27. And they took Paltith and brought her before their judges, and they said to them, Thus did she do, and it is she who supplied the poor man with bread, therefore did he not die all this time; now therefore declare to us the punishment due to this woman for having transgressed our law.
28. And the people of Sodom and Gomorrah assembled and kindled a fire in the street of the city, and they took the woman and cast her into the fire and she was burned to ashes.
29. And in the city of Admah there was a woman to whom they did the like.
30. For a traveler came into the city of Admah to abide there all night, with the intention of going home in the morning, and he sat opposite the door of the house of the young woman’s father, to remain there, as the sun had set when be had reached that place; and the young woman saw him sitting by the door of the house.
31. And he asked her for a drink of water and she said to him, Who art thou? and he said to her, I was this day going on the road, and reached here when the sun set, so I will abide here all night, and in the morning I will arise early and continue my journey.
32. And the young woman went into the house and fetched the man bread and water to eat and drink.
33. And this affair became known to the people of Admah, and they assembled and brought the young woman before the judges, that they should judge her for this act.
34. And the judge said, The judgment of death must pass upon this woman because she transgressed our law, and this therefore is the decision concerning her.
35. And the people of those cities assembled and brought out the young woman, and anointed her with honey from head to foot, as the judge had decreed, and they placed her before a swarm of bees which were then in their hives, and the bees flew upon her and stung her that her whole body was swelled.
36. And the young woman cried out on account of the bees, but no one took notice of her or pitied her, and her cries ascended to heaven.
37. And the Lord was provoked at this and at all the works of the cities of Sodom, for they had abundance of food, and had tranquility amongst them, and still would not sustain the poor and the needy, and in those days their evil doings and sins became great before the Lord.
38. And the Lord sent for two of the angels that had come to Abraham’s house, to destroy Sodom and its cities.
This connects with a verse I found elsewhere in the Bible:
Eze 16:48 [As] I live, saith the Lord GOD, Sodom thy sister hath not done, she nor her daughters, as thou hast done, thou and thy daughters.
Eze 16:49 Behold, this was the iniquity of thy sister Sodom, pride, fulness of bread, and abundance of idleness was in her and in her daughters, neither did she strengthen the hand of the poor and needy.
Eze 16:50 And they were haughty, and committed abomination before me: therefore I took them away as I saw [good].