Although William Shakespeare was extremely popular in his day, he lived in an era where one had to think outside the box when coming up with advertisement strategies. Plays were performed daily, only closing due to plague outbreaks. In order to ensure the audience knew what they were paying for (and, therefore, be a happy audience rather than a rotten vegetable throwing type of audience), Shakespeare and company couldn't just compile a list of scheduled plays. Why not? Well, most people couldn't read! Specifically the groundlings, who were also the most likely ones to start throwing rotten vegetable and other types of garbage and waste.

Rather than chance an irate audience, flags would fly outside the Globe to inform potential theatre attendees about what type of play was to be performed.

White flag: comedy

Red flag: history

Black flag: tragedy

It was a great way to advertise to an illiterate community (and a great way to prevent spoiled food from being thrown at the actors).

There is some studies of wonder about why the specific colors were chosen. There is no document from Shakespeare or anyone else that explains why the colors were chosen. Each color could be symbolic, or, possibly, Shakespeare chose easy-to-make flags in case of wear and tear (plays really were performed daily - that's a lot of flag flying).

More Info: www.nosweatshakespeare.com