I'm reasoning here, I don't actually know, but i would guess the phrase comes from the medieval punishment of the stocks, where a felon was left for a set time to laughed at by passers-by, or pelted with fruit and veg. etc. This will keep you going until my colleagye Quizmonster appears with the definitive answer, and educates both of us, and I wonder once again how he does it!
'Laughing-stock' certainly predates Shakespeare (born 1564), having first appeared in the 1530s. A 'stock' originally meant a tree-trunk or tree-stump. From that, it came to mean a stupid person, as in "he's a bit of a wooden lump" or "he's as thick as two short planks." Hence, a laughing-stock was, basically, "the idiot everybody's laughing at."
Thank you all - QM your home must be wall to wall reference books, I tended to go along with the stocks and folks laughing at the felon therein, but your answer took me by surprise.
Yeah, I do have rather a lot of books, PG! That, plus a lifelong love-affair with English, helps me a lot with such questions. Oh...and - being retired - having the time to research when I don't already know. Cheers