Genesis 18:20-32 is the story of Abraham negotiating with the Lord to spare the cities if there are 50, 40, 30, 20 or just 10 righteous to be found in the city. Now I'm not sure why it says "city" since it sounds as if Sodom and Gomorrah are two places. Time to ask google I guess. After browsing a bit I'm not sure that Gomorrah features too strongly. So for now let's just ask what was demonstrated by the text? It was one of the readings in mass I think just last week.
Obviously two points are being made. The first is that even Abraham thinks there is a lot amiss in Sodom, for his first figure is 50 righteous. We don't know how big a place Sodom was. This doesn't sound like a very large percentage of the population though. So Abraham doesn't think much of this bunch. The Lord says He'll spare the city if 50 righteous can be found. Then Abraham proceeds to negotiate Him down. Abraham had to feel pretty comfortable with God to just start this kind of a conversation. The Lord is demonstrating both that He is a friend of Abraham, after all He's made these generous promises to him, and that He is merciful. Of course we will find soon enough that there are not even ten righteous men in Sodom.
Chapter 19 tells the story of Lot and the events that overtook the angels when they reached Sodom. There are a number of very bizarre features to the story, not the least the willingness of Lot to give his daughters to the crowd. What is that all about? The refusal of the crowd suggests that they wanted to sexually abuse men not women, hence no doubt the fact that this event has generally been seen as a condemnation of sodomy. Certainly it seems much more than mere lack of hospitality. The story ends with an even more bizarre event which is Lot's daughters getting him drunk so they can have their will with him and preserve the family line. These must have been really ugly daughters or the area must have really been short of men, at least men that would be acceptable suitors. So what is this all about? The video below shows you what the site of Sodom and Gomorrah looks like today. I wondered as I watched it if anyone was allowed to actually cut into the ash and see if the apparent city walls and such were really in there. Fascinating question. SEE THIS ACCOUNT