אשר אני עושה WHAT I AM DOING in Sodom. It is not proper for Me to do this thing without his knowledge. I gave him this land and these five cities therefore are his — as it is said, (10:19) “And the territory of the Canaanites was from Sidon … as thou goest towards Sodom and Gommorah etc.” I called him Abraham, the father of a multitude of nations; should I destroy the children without informing the father who loves me? (Genesis Rabbah 49:2)
Etz Hayim on 18:19 This is a verse of supreme importance in the Book of Genesis. God promises to have a special relationship with Abraham and his children, so that they will be inspired to do what is right and just. The negotiations over the fate of Sodom is one result of that relationship and the commitment to what is right and just. "The descendants of Abraham are characterized by three traits: a capacity for kindness, a sense of honor, and a commitment to do what is right." (Talmud)
Rashi on 18:20-21
"And the Lord said" to Abraham. For He did as He Had said, that God would not hide from him.....
"I will go down now..." This teaches judges that they should not decide capital punishment cases unless they see it (for example, they must go to the site and investigate the matter.)
Midrash Tanchuma, Vayera 8:1
And the two angels came to Sodom at evening (Gen. 19:1). What is written before this verse? And Abraham drew near and said, “Wilt Thou sweep away the righteous with the wicked?” (Gen. 18:23). R. Phinehas the priest, the son of Hama, stated: Certainly the Holy One, blessed be He, does not desire to find any of His creatures guilty, for it is said: I have no pleasure in the death of him that dieth (Ezek. 18:32). Furthermore it says: For Thou are not a God that hath pleasure in wickedness (Ps. 5:4); and: As I live, saith the Lord Eternal, I have no pleasure in the death of the wicked (Ezek. 33:11). What does the Holy One, blessed be He, take pleasure in doing? In proving the righteousness of His creatures, as it is said: The Lord was pleased, for His righteousness’ sake (Isa. 42:21). Proof of this is that even when mankind sins against the Holy One, blessed be He, and provokes him to anger, He relents and seeks an advocate to plead in their behalf. In fact, He suggests the arguments the advocate can employ. Hence, you find that at the time of Jeremiah, He proclaimed: Run ye, to and fro, through the streets of Jerusalem, and see now and know, and seek in the broad places thereof, if ye can find a man. If there be any who doeth justly, that seeketh truth, and I will pardon her (Jer. 5:1).
Midrash Tanchuma, Vayera 8:2
Similarly, after the Sodomites had transgressed, He revealed His intentions to Abraham in order to discover something to their credit, as it is said: And the Lord said: “Shall I hide from Abraham?” Abraham began to plead in their behalf, as it is said: And Abraham drew near and said: “Wilt Thou, indeed, sweep away the righteous with the wicked?” (Gen. 18:23). Drew near is an expression used to indicate prayer, as is said: And it came to pass, at the time of the offering of the evening offering, that Elijah the prophet drew near and said: “O Lord, the God of Abraham, of Isaac, and of Israel” (I Kings 18:36).
You Don't Have To Be Wrong For Me To Be Right, by Brad Hirschfeld includes many gems, including:
“We must never worry that we are not up to the task, although most of us always will. After all, who was Abraham? What was special about him? Nothing! Abraham and Sarah were you and me!”
“People long to be comfortable because they feel unsafe, but if we could help people to feel safe, then they could risk being uncomfortable…. The real issue is how to help people feel safe enough to risk being uncomfortable and uncertain.”
In Abraham’s journey when God says he plans to destroy Sodom, Abraham asks, “Will you sweep away innocent along with guilty?” In essence, Abraham is telling God that if God surrenders a sense of justice and goodness, God isn’t God.”
Etz Hayim on 18:24 "Fifty virtuous people within the city" If a community can produce a subculture of righteous people, and if they involve themselves within the city, trying to change it, then there is hope for the community. But, if the righteous are only isolated individuals who avoid or are barred from being involved in the affairs of the city, there is no hope. One can only extricate them and condemn the rest.
Rashi on 18:25 "Far be it from You" Chalillah. This is unfitting for you. They will say "So is His craft. He inundates everyone, virtuous and wicked." So you did to the Generation of the flood....
Richard Elliot Freedman on 18:25 "Far be it from you to do a thing like this....." This is the first time in the Bible that a human questions (challenges) a divine decision. Moses will take this even further on at least three occasions.
Rashi on 18:32 "Maybe ten will be found there" For fewer than ten, Abraham did not ask. He said, "in the generation of the floor, there were eight, Noah and his sons and their wives, but they did not save the generation."