Why does HaSh-m present Avraham's praises here?
Rashi #1: HaSh-m is saying here, 'Shall I hide My plans from Avraham, who is so precious to Me that he will become a great nation and that all the nations will be blessed through him?'
Rashi #2 (citing a Midrash): 'Zecher Tzadik li'Verachah' - When one mentions a Tzadik by name, one blesses him. 1
Ramban: Seeing as Avraham would be a source of blessing for the whole world, HaSh-m had to inform him of the impeding destruction of Sedom, so that people would not wonder how HaSh-m could hide such a major decision from him, or why Avraham could be so cruel 2 as to make no effort to save his neighbors by praying on their behalf. Furthermore, revealing HaSh-m's secret decision to Avraham would be worthwhile, seeing as, since he is fully aware that HaSh-m does justice combined with charity, he will teach his children (and adherents) to go in HaSh-m's ways. Consequently, he will Daven on their behalf, that, if they will follow that path, they should be spared; but if they don't, in which case they are completely guilty, he will accede to HaSh-m's judgment.
Refer to 18:18:1.1.
Ohr Yechezkel (Midos, p. 104): Is it cruelty not to pray for Resha'im? Yes! This is an obligation of man, and his primary Sheleimus.
QUESTIONS ON RASHI
Rashi writes: "Since [HaSh-m] mentioned Avraham, He blessed him." But there are many instances when HaSh-m mentioned Avraham, and did not immediately bless him?
Gur Aryeh #1: Here, the Torah goes out of its way and mentions Avraham, even though HaSh-m is not yet speaking to him.
Gur Aryeh #2 (to 6:9): The Torah praises a Tzadik when he is mentioned in proximity to a Rasha, whose evil influence might overshadow our memory of the Tzadik. 1