The sin of Sodom and Gomorrah was wickedness and depravity that had spread throughout the cities. In Genesis 18 and 19, God sends two angels to Lot, Abraham's nephew. However, the city's men gather outside Lot's house and demand that the angels be brought out to them so they can have sexual relations with them.
This reflects the widespread sexual immorality and perversion that had taken hold of the city. As a result, God destroys Sodom and Gomorrah with fire and brimstone, sparing only Lot and his family except his wife.