Lynne Truss attributes an early form of the modern question mark in western language to Alcuin of York. Truss describes the punctus interrogativus of the late 8th century as "a lightning flash, striking from right to left". (The punctuation system of Aelius Donatus, current through the Early Middle Ages, used only simple dots at various heights.)
This earliest question mark was a decoration of one of these dots, with the "lightning flash" perhaps meant to denote intonation (or a tilde or titlo, named after the Latin word titulus, as in " ·~ ", like those wavy and more or less slanted marks used in lots of medieval texts for denoting various things such as abbreviations, and that would become later various diacritics or ligatures or modified letters used in the Latin script), and perhaps associated with early musical notation like neumes. Over the next three centuries this pitch-defining element (if it ever existed) seems to have been forgotten, so that the Alcuinesque stroke-over-dot sign (with the stroke sometimes slightly curved) is often seen indifferently at the end of clauses, whether they embody a question or not.
In the early 13th century, when the growth of communities of scholars (universities) in Paris and other major cities led to an expansion and streamlining of the book-production trade, punctuation was rationalised by assigning Alcuin's stroke-over-dot specifically to interrogatives; by this time the stroke was more sharply curved and can easily be recognised as the modern question-mark.
The symbol is also sometimes thought to originate from the Latin quaestiō (that is, qvaestio), meaning "question", which was abbreviated during the Middle Ages to qo. The lowercase q was written above the lowercase o, and this mark was transformed into the modern symbol. However, evidence of the actual use of the Q-over-o notation in medieval manuscripts is lacking; if anything, medieval forms of the upper component seem to be evolving towards the q-shape rather than away from it.