In the Quran the number of angels is not mentioned [Quran 11:77]. From the Sahabah, the more widely accepted report is of three angels: Gabriel, Michael and Israfil (Raphael).
The narration of two angels likely comes from the the Torah where three angels visited Abraham [Genesis 18:2], and two visited Lut [Genesis 19:1]. Jewish commentaries state that one angel had fulfilled his task on visiting Abraham and didn't proceed to Sodom. According to the Talmud: Raphael's task was to heal Abraham. Michael's task was to give news of Isaac and to rescue Lot. And Gabriel's task was to destroy Sodom (the last one coincides with Islamic tradition).
From Tafsir Qurtubi:
وهم جبريل وميكائيل وإسرافيل عليهم السلام؛ قاله ٱبن عباس
They were Gabriel, Michael and Israfil, this is the saying of Ibn
From Ibn Kathir's stories of the Prophets Bidaya Wal Nihaya:
قال المفسرون : لما فصلت الملائكة من عند إبراهيم وهم ؛ جبريل ، وميكائيل
، وإسرافيل ، أقبلوا حتى أتوا أرض سدوم
The Muffasirin say: These angels left Abraham, and were Jibrail,
Michail and Israfil. They travelled until they reached Sodom.
والقول الآخر خطأ مأخوذ من أهل الكتاب . وقد تصحف عليهم ، كما أخطئوا في
قولهم : إن الملائكة كانوا اثنين ، وإنهم تعشوا عنده ، وقد خبط أهل
الكتاب في هذه القصة تخبيطا عظيما
The latter saying [that Lot meant his real daughters] is that of the
People of the Book. And they have corrupted their scriptures. And they
say that the angels were two, and that they ate food ...