Are there historical accounts of the character of the people of Sodom and Gomorrah? Are there any historical accounts, biblical or otherwise, that shed light on what types of people lived in Sodom and Gomorrah? I'm especially curious about any extra-biblical accounts of these two places.

Such accounts might shed some light on whether God's treatment of these two cities was justified.
Here are some of the most relevant Biblical accounts I have found:

[Genesis 13:13 NKJV] 13 But the men of Sodom [were] exceedingly wicked and sinful against the LORD.
[Genesis 18:20-26 NKJV] 20 And the LORD said, &quot;Because the outcry against Sodom and Gomorrah is great, and because their sin is very grave, 21 &quot;I will go down now and see whether they have done altogether according to the outcry against it that has come to Me; and if not, I will know.&quot; 22 Then the men turned away from there and went toward Sodom, but Abraham still stood before the LORD. 23 And Abraham came near and said, &quot;Would You also destroy the righteous with the wicked? 24 &quot;Suppose there were fifty righteous within the city; would You also destroy the place and not spare [it] for the fifty righteous that were in it? 25 &quot;Far be it from You to do such a thing as this, to slay the righteous with the wicked, so that the righteous should be as the wicked; far be it from You! Shall not the Judge of all the earth do right?&quot; 26 So the LORD said, &quot;If I find in Sodom fifty righteous within the city, then I will spare all the place for their sakes.&quot;

Abraham negotiates it down to 10 people, and even still, if there were 10 righteous people in the city, God would not destroy it.  The next portion illustrates how great their sin is:

[Gen 19:1-18 NKJV] 1 Now the two angels came to Sodom in the evening, and Lot was sitting in the gate of Sodom. When Lot saw [them], he rose to meet them, and he bowed himself with his face toward the ground. 2 And he said, &quot;Here now, my lords, please turn in to your servant's house and spend the night, and wash your feet; then you may rise early and go on your way.&quot; And they said, &quot;No, but we will spend the night in the open square.&quot; 3 But he insisted strongly; so they turned in to him and entered his house. Then he made them a feast, and baked unleavened bread, and they ate. 4 Now before they lay down, the men of the city, the men of Sodom, both old and young, all the people from every quarter, surrounded the house. 5 And they called to Lot and said to him, &quot;Where are the men who came to you tonight? Bring them out to us that we may know them [carnally].&quot; 6 So Lot went out to them through the doorway, shut the door behind him, 7 and said, &quot;Please, my brethren, do not do so wickedly! 8 &quot;See now, I have two daughters who have not known a man; please, let me bring them out to you, and you may do to them as you wish; only do nothing to these men, since this is the reason they have come under the shadow of my roof.&quot; 9 And they said, &quot;Stand back!&quot; Then they said, &quot;This one came in to stay [here], and he keeps acting as a judge; now we will deal worse with you than with them.&quot; So they pressed hard against the man Lot, and came near to break down the door. 10 But the men reached out their hands and pulled Lot into the house with them, and shut the door. 11 And they struck the men who [were] at the doorway of the house with blindness, both small and great, so that they became weary [trying] to find the door. 12 Then the men said to Lot, &quot;Have you anyone else here? Son-in-law, your sons, your daughters, and whomever you have in the city--take [them] out of this place! 13 &quot;For we will destroy this place, because the outcry against them has grown great before the face of the LORD, and the LORD has sent us to destroy it.&quot;

In the previous passage, the men of Sodom tried to rape the angels, who were also male.  Lot was trying to protect them.  They tried to break into Lot's house so they could rape them, and tried to harm Lot too.  Even when the angels struck the men with blindness, they kept trying to break in!  Their sin was indeed very bad.
I don't know of any extra-biblical sources, hopefully someone else can post these.