“But when he saw many of the Pharisees and Sadducees coming to his baptism.” This event is also recorded in Luke 3:7-9, and that record lets us know that the “multitudes” were coming to John and he was speaking to them. However, Matthew lets us know that, although John said what he said in a way that everyone could hear him, part of what he said, was to, and specifically applied to, the Jewish leaders, which were the Pharisees and Sadducees mentioned here in Matthew 3:7. They were the “trees” (Matt. 3:8), the high and mighty “pillars of society” who ruled Israel and thought themselves better than others (Luke 18:11), and refused to be baptized by John (Luke 7:30), and who were in danger of being “cut down” and thrown into the fire of Gehenna, the Lake of Fire (Matt. 3:10; Luke 3:9; cp. Rev. 20:11-15).
“You offspring of vipers!” The phrase, “You offspring of vipers! Who warned you to flee from the wrath to come” appears in the same context in Matthew 3:7 and Luke 3:7. Jesus also called the religious leaders a generation of vipers (Matt. 12:34; 23:33).
“The wrath that is about to come.” This is the wrath associated with the Day of the Lord (see commentary on Rev. 6:17). The wrath did not come quickly, and still has not come. John the Baptist did not know that God would interpose the Administration of the Sacred Secret, which we are in today, between the resurrection of Christ and his coming in Judgment. He thought since the Messiah was on earth, Armageddon would come soon.
[For a more complete understanding of the Administration of the Sacred Secret, and an explanation of administrations in the Bible, see Graeser, Lynn, Schoenheit, The Gift of Holy Spirit: The Power to be like Christ, Appendix A “The Administration of the Sacred Secret.” Also, see commentary on Ephesians 3:2.]