If, as Haman states (Esther 5:12), only Haman and Achashveirosh were invited to Esther's party what is Charvonah doing there?
Haman and the King were the guests. However, as nobility there were servants and "members of the staff" there. The modern concepts of privacy did not exist in those days. Consider that a noble would be able to sit down without considering if a chair was there, because one would "miraculously" appear under him. Thus, Charvonah was standing there waiting to be called on for whatever his mistress required. It was his job to answer whatever the queen or king required (even by implication). Note that the pasuk says
This is translated as on of the "officers", "chamberlains", or even "eunuchs" who were there as part of their duties.
Even nowadays, no king or queen (or president) would go anywhere without an entourage even if he were the "only" guest.
In this case it was a chance to get rid of an enemy and help the queen gain more power with the king.
The Art Scroll Megillah (1976 printing) gives several reasons for his speaking up
Panim Acherim says that he accused Haman of having been involved with Bigsan and Teresh and was planning to kill Mordechai in revenge for Mordechai's stopping the plot. He did this in order to curry favor with the new favorite.
The Yad Hamelech says that the Talmud (Megillah 16a) says that he had been part of Haman's plan to hang Mordechai and was trying to get rid of Haman before Haman could implicate him.
Yosef Lekach says that Charbonah was one of the officers sent to get Haman an bring him to the banquet. While there he saw the gallows and heard what it was to be used for. He took the opportunity to inform the king.
There are other Midrashim that expand on this theme.