Like most aspects of written language, punctuation has developed haphazardly over many centuries.
Early classical texts didn't even have spaces between words, let alone punctuation marks, but scribes gradually devised a variety of marking systems as guides to methods of oratory.
In England, the first recognisable punctuation mark was the "punctus" or point (full stop), used to mark sentence boundaries since the 12th century. Medieval scribes used many different marks to show grammatical boundaries within the sentence, but by the mid-15th century these were dominated by the present-day colon, and an oblique line (), which eventually shrank down into a comma. Similarly, a number of different squiggles did the rounds before our present-day question mark was established.
Across Europe, Renaissance scholars, anxious to make classical texts available to a wider audience, began refining punctuation to make meaning clear. The semi-colon was invented in Venice at the end of the 15th century to mark a break somewhere between a comma and a colon. Brackets and exclamation marks appeared in Italy around the same time.
The arrival of the printing press hastened standardisation, and by the end of the 16th century all the above marks were in general use in English texts. Meanwhile, the popularity of plays created a demand for new marks to show how lines should be spoken: the apostrophe indicatng omitted letters (spoken can't as opposed to written cannot), and marks showing that speeches were interrupted or incomplete - the dash and the ellipsis (three dots).
Speech marks appeared early in the 18th century, when the rise of the novel led to the invention of direct speech punctuation, but took time to become established. The printer and novelist Samuel Richardson preferred to indicate direct speech by starting a new line and opening with a dash.
By the 18th century, the apostrophe was regularly used to signal possession in singular nouns. There was, however, debate over whether and how it should be used in possessive plurals, and concern about its frequent use before an s in plural nouns ending in a vowel (for instance, two piano's). Nineteenth century printers and grammarians tightened up the rules, outlawing that last usage, but it is still a problem, not least among greengrocers.
As we move into the 21st century, punctuation continues to develop. Internet users have now appropriated the asterisk (which has been around, doing odd jobs, since the Middle Ages) to signify emphasis. And exciting experimentation continues on the Net with "emoticons" (emotive icons) which can indicate a wide range of nudges and winks - including the fact that a particular sentence is not to be taken seriously ;- ) (Look sideways to see smiling, winking icon at end of last sentence.)