A good way to merit a good judgment on Yom Kippur is to accept to love every Jew and to judge everyone favorably. If one does this, Hashem treats him middah k’negged middah and judges him favorably and with love. When one defends another Jew on Yom Kippur, Hashem, in turn, defends him.
This idea is seen from the pasuk (Shemos 33:19): “And I will favor when I wish to favor, and I will have compassion when I wish to have compassion.” The Gemara states (Brachos 7A): “I will favor when I wish to favor” – even if the person is undeserving. “I will have compassion when I wish to have compassion” – even if the person is undeserving.
Sefer Tiferes Shlomo says that from this pasuk we see the power of davening for one’s friend. He understands it to mean that Hashem will grant favor even if the person who is davening is undeserving and He will grant compassion even if the person one is davening for is undeserving. He will still accept this prayer because one who davens for his friend is answered first (Bava Kama 92A).