I would like to add to Muke Tever's answer the following, as a motivation for Abraham's (Abram) appeal to God on behalf of Sodom.
Sodom was important to Abraham
In Genesis 13, we are told Abraham and Lot could no longer dwell together because their prosperity was such that, "the land could not bear them" (v. 6). Abraham says to Lot, "Let there be no strife, I pray thee, between me and thee, ... for we be brethren." (v.8). Presented with an open choice regarding the land, Lot opts for the Jordan plain, where "he pitched his tent toward Sodom" (v. 12).
Sodom was important to Abraham because it was where Lot had chosen to set down roots and build his family.
How strong was Abraham's bond with Lot?
In Genesis 14, we're told Abraham received word that Lot had been captured (v. 13,14) and he immediately set about chasing down those responsible. According to the previous chapter (v. 18), Abraham was living in Hebron, and we are told here (v. 14,15) that he apprehended Chedorlaomer at Dan and Hobah, in the vicinity of Damascus - a journey of around 200km.
Clearly Lot and his family mattered greatly to Abraham.
Why fifty righteous people?
Abraham simply estimated the size of Lot's family at fifty people, who he believed to be righteous because Lot shared his knowledge and experience of God to that point in time.
Is fifty an unreasonable number? No. I think it would have been pretty-well on the mark, considering what we are told later on in the narrative concerning Abraham's descendant, Jacob.
In Genesis 46:7, we read, "... all the souls of the house of Jacob, which came into Egypt, were threescore and ten.". So, from the time Jacob married Leah in Haran, to the time he arrived in Goshen, his family had grown to seventy souls.
Abraham didn't know this, of course, but we do, and it attests to the reasonableness of Abraham's estimate of fifty as the size of his family living in Sodom.
Why did Abraham stop at ten?
Abraham stopped at ten because by the time of that last appeal he was totally convinced that the LORD had given full consideration for his concern for his family, and that any of them who could be saved, would be saved.