After Hashem declared that He was going to destroy Sedom, Avraham begged Him to save the city if a minimum number of righteous people could be found in it. Avraham's actions teach us several important lessons.
We must never write people off as failures. Everyone can always turn his live around. Therefore, one should never turn his back on another person. In fact, one should encourage and support this type of person to return to Judaism. We learn this lesson from Avraham's reluctance to ask Hashem to spare the city if less than ten righteous people can be found. Unlike other religions, Judaism's Talmidei Chachamim do not become hermits. Jews must be a constant source of light to each other and to other nations.
The best way to interact with God is through prayer. Avraham teaches us that this sort of interaction is not accomplished through self - isolation, but by remaining part of the whole nation and never separating from it. Indeed, the best way for a Jew to pray is with a Minyan. The Jew's community is one of the most important components in his spiritual survival. Therefore, we should learn a lesson from Avraham and help our communities grow and stay together while being a light to each other as well as to the rest of the world.