Apparently the ashes on the forehead custom was in use by the 10th century. The custom is a token of mourning and repentance. Memento homo quia pulvis es, et in pulverem revertis ('Remember man, for dust thou art, and to dust shalt thou return'. Gen.3:19).
A letter in 1654 describes how strange Christians looked when they walked around with smudged faces. "The Christian Church hath a longer and more solemn Way of fasting than any other Religion, take Lent and Ember-weeks together. In some Church the Christian useth the old Way of Mortification, by Sackcloth and Ashes, to this Day; which makes me think of a facetious tale of a Turkish ambassador in Venice, who being returned to Constantinople, and asked what he had observed most remarkable in that so rare a City? He answered, that among other Things, the Christian hat a Kind of Ashes, which thrown upon the Head doth presently cure Madness; for in Venice I saw the People go up and down the Streets (said he) in ugly antic strange Disguises, as being in the Eye of human Reason stark mad; but the next Day (meaning Ash-Wednesday) they are suddenly cured of that Madness by a Sort of Ashes which they cast upon their Heads."
[sources: The Oxford Companion to the Year; The Oxford Dictionary of the Christian Church]