"From the LORD" (Genesis 19:24). What is written above this matter? "And the two angels came to Sodom in the evening" (Genesis 19:1). There, by Abraham, three came, for it says, "And he lifted up his eyes and looked, and behold, three men" (Genesis 18:2); but here they are two, as it is said, "And the two angels came." Rather, the Holy One, blessed be He, sent three angels, each one to perform his own errand: one went to bring tidings to Sarah, one to rescue Lot, and one to overturn Sodom. And one angel does not perform two errands, [and two angels do not perform one errand]. Michael went to bring tidings to Sarah. "We shall surely return to you" is not written here, but rather "I will return" (Genesis 18:10); he performed his errand and departed. And the two went to perform their errand, as it is said, "And the two angels came to Sodom in the evening." There Scripture called them "men," and here it called them "angels." Rather, Rabbi Alexandri said: By Abraham they were "men," for the angels were a common sight in the house of Abraham, as it is said, "She watches over the goings of her household" (Proverbs 31:27) — that those who went about the house of Abraham were angels. And because he was accustomed to angels, they appeared to him in the form of men. But to Lot, who was an ordinary person, they appeared as angels, as it is said, "And the two angels came to Sodom" (Genesis 19:1).
Why Three Angels Came to Abraham but Only Two to Sodom
Midrash Tanchuma Buber, Vayera 20:1
מאת ה'. מה כתיב למעלה מן הענין, ויבאו שני המלאכים סדומה בערב, להלן אצל אברהם באו שלשה, שאמר וישא עיניו וירא והנה שלשה אנשים (בראשית יט א), וכאן הם שנים, שנאמר ויבאו שני המלאכים, אלא שלשה מלאכים שלח הקב"ה כל אחד ואחד לעשות שליחותו, אחד הלך לבשר את שרה, ואחד למלט את לוט, ואחד להפוך את סדום, ואין מלאך עושה שתי שליחות, [ואין שני מלאכים עושים שליחות אחת], מיכאל הלך לבשר את שר, שוב נשוב אליך אין כתיב כאן, אלא אשוב, עשה שליחותו והלך לו, והשנים הלכו לעשות את שליחותן, שנאמר יבאו שני המלאכים סדומה בערב, להלן קרא אותן אנשים, וכאן קרא אותן מלאכים, אלא אמר ר' אלכסנדרי אצל אברהם היו אנשים, שהיו המלאכים מצויין בביתו של אברהם, שנאמר צופיה הליכות ביתה (משלי לא כז) שהיו הולכי ביתו של אברהם מלאכים, ועל ידי שהיה מצוי במלאכים, נדמו לו בדמות אנשים, אבל לוט שהיה הדיוט, נראו לו מלאכים, שנאמר ויבאו שני המלאכים סדומה וגו'.