At times this argument is made far too plainly. I recall once watching a YouTube video where a young man boldly stated nothing more than, "See, there's three here. That's the Trinity!" A more careful and educated approach comes from an examination of the following verses:
And the LORD appeared to him by the oaks of Mamre, as he sat at the door of his tent in the heat of the day. He lifted up his eyes and looked, and behold, three men were standing in front of him. When he saw them, he ran from the tent door to meet them and bowed himself to the earth and said, "O Lord, if I have found favor in your sight, do not pass by your servant." [Genesis 18:1-3]The idea is this: three men appear before Abraham (v. 2), yet he addresses them in the singular ("Lord," v. 3), and it is said that "the Lord," in a singular sense, appeared to Abraham (v. 1). This does, at surface level, seem to be a fine example of the Trinity, which is three Persons unified within the one Being of God. To give an example of such a mindset in regards to Genesis 18:
...these three men have never been viewed by the Church as a "pre-Incarnation" of the Holy Trinity but rather as an appearance of the Holy Trinity in the guise of three Angels, a temporary appearance manifested in order that God might speak with the holy patriarch. [Timothy Copple and Patrick Barnes, Presumptuous Propositions; source]And again:
The first verse of this chapter says that ‘the Lord appeared’ unto Abraham, and then proceeds to tell that ‘three men stood over against him,’ thus indicating that these were, collectively, the manifestation of Jehovah. [Alexander McClaren, from his commentaries; source]And again:
...the three Persons in the Trinity, in the shape of three men, appear to Abraham and dine with him, and eat the first flesh mentioned eaten in all the Scripture. [John Lightfoot, quoted from John Gill; source]The problem with this interpretation, however, is what happens after the conversation between Abraham, Sarah and the Lord:
So the men turned from there and went toward Sodom, but Abraham still stood before the LORD. [Genesis 18:22]It is said that "the men" turned from there and go towards Sodom, but the Lord stayed before Abraham, and enters into dialogue with him following this verse (the Lord doesn't leave until verse 33). In the very next chapter, the men arrive at Sodom, and are not only numbered at two, but are identified as angels (Gen 19:1). The first man, whom Abraham had addressed at the start of chapter eighteen, is referred to later explicitly as the Lord, but is never referred to as an angel like the other two were. Reading scripture plainly, we have to come to a different conclusion than those who stop at the first few verses of Genesis 18: the three men were not the three Persons in the Trinity, but the Lord accompanied by two angels.
Genesis 18, therefore, has absolutely nothing to do with the Trinity. The only connection between this appearance of three men and the Trinity is the fact that both involve the number three. What can be argued, perhaps, is that this is an example of the pre-incarnate Son in the Trinity appearing to believers. It might be interesting to note here (as discussed in the book The Rublev Trinity by Gabriel Bunge) that, before Rublev, many iconographic depictions of the Genesis account depict three angels, with one bearing the cross on his halo and sometimes the familiar markings of "IC/XC" (Jesus Christ in Greek abbreviation). This would be a far closer depiction of what is actually unfolding in the Genesis account.
Keep in mind I'm not declaring anyone who argues Genesis 18 teaches the Trinity is a heretic. However, I would humbly ask them to review this section of scripture and come to a conclusion that is loyal to what it says regarding these three men.