Genesis 13 describes Lot choosing the well-watered Jordan plain and moving his tents toward Sodom. The text immediately notes the great wickedness of the city's inhabitants.
Genesis 14 places Sodom and Gomorrah among five cities whose kings rebelled against an eastern coalition. Lot was captured during the resulting conflict and rescued by Abraham.
Genesis 18-19 contains the best-known account. Abraham interceded for Sodom after learning of impending judgment. Two angels visited Lot, and after the wickedness of the city was dramatically demonstrated, Lot and members of his family were led away before Sodom and Gomorrah were destroyed.
Later biblical writers repeatedly use Sodom and Gomorrah as examples of severe judgment upon persistent wickedness.