The pepper is light enough to be carried around by the circulating coolant (IE, it doesn't settle to the bottom like sand would) and with enough of it in the system, it's carried along with the coolant as it leaks out through a pinhole.
Except the pepper particle can't pass through the pinhole, and so blocks it. It also doesn't break down with the heat and isn't dissolved by the chemistry of the coolant, so makes a long-lasting "repair".
The silver "stop leak" stuff works the same way- it's a "flake" of an aluminum-based alloy light enough to be carried around in the coolant flow, and plugs holes the same way.
The benefit to the pepper is that, in the old days, they used to repair the old brass radiators by unsoldering the end caps and "rodding" out the tubes- literally jamming a flat bar down each passage to knock out corrosion or blockages. They'd also "hot tank" the cores, which again dissolved out corrosion and ate away stuff on the outside as well- like impacted bugs, dried leaves, small twigs, etc.
The pepper was dissolved by the hot tank, or at least soft enough to be dislodged by the rodding, so that the tubes could be properly repaired with solder. The silver stuff doesn't boil out well, and can compact to the point it can't easily be rodded.
That's less important these days, since no one rebuilds radiators anymore- it's easier to scrap it and buy a replacement aluminum one.
Also, it's cheaper- everybody has a box of black pepper at home, so you don't have to drive to the store to buy a $5 tube of Stop-Leak.