The man who watches over the pillory tells you that his pet monkey, Queen Pillory, is really good at tossing tomotoes at the prisoners. However, she needs some encouragement to show off her trick - specifically, rum from her home island.
This mission is repeatable, without any timers involved. You can do it as often as you have crates of rum. Monkey Island Rum drops off Lost Ironsides pirates (the area around Ruddy Cove is a good place to look for them).
When you hand in your rum, this triggers a small animation in which Primley's monkey grabs a tomato from the nearby barrel and throws it at the prisoner that's locked up in the pillory. Apart from that, it's currently not clear if there is any further point to this mission.