Genius suggests that this is a reference to Claudius’ marriage but it seems to me that the more immediate purpose of this line is to let Claudius know that he knows, not only THAT the king killed the Queen, but how.
It’s a direct reference to what Hamlet knows is the murder weapon. Also – depending on how the poison was delivered, the union might still literally be in the drink. If, for example, it was a pearl coated in poison, the pearl coated in poison, the pearl is still in there. If it was a pearl made from poison that dissolves in liquid, it’s gone.
If there’s still a pearl in that cup, Claudius could choke on it – providing yet another method of killing him. It may be the literal definition of overkill but Claudius could die from stabbing, blood poisoning, drink poisoning and maybe even choking.
Because sometimes one death is not enough for a real villain like Claudius. You gotta kill him all the ways.