I remember seeing a Lear from The Royal Shakespeare Company in London where they played it for laughs, an audience stuffed with tourists and kids some of whom hardly spoke English, and they tittered all the way through, especially when Gloucester thinks he has survived the fall.
I think Midsummer Nights Dream is one of the funniest things ever written, I love the bit where Bottom becomes a wall with a chink in it.
Someone mentioned Molliere. He obviously knew a thing or two about comedy but I wonder how deep it is really. I saw Bourgeois Gentilhomme just a few weeks ago and I thought how Shakespearian it was, but Shakespeare would have made more of the internal comflicts, Jourdain's class conflicts. Somehow Jordain is less humane than Malvolio, for example, or Falstaff. And not enough questioning about whether a bourgeois has or can have style, class. Maybe it was the performance, Bouffes du Nord, but it was enjoyable, as always there. I laughed out loud at Louis de Funès playing Harpagon, but there I think the character is more 2D than Shakespeare would have made him.
There's a whole genre of Shakespeare's plays which look like comedies but which are really looking at major moral problems, plays like Measure for Measure.