In the Christian calendar, the 14th February is the anniversary of the martyrdom of St Valentine, a 3rd century Bishop of Terni. He had very little to do with love, except for the kind that's a theological virtue, although all kinds of legends about him sprang up later to justify the identification of his day with lovers.
The earliest known mid-February festival that might be connected with today was the Roman feast of Lupercalia, but this was nothing to do with sighing lovers and pretty flowers. Lupercalia, the festival of the wolf, was a celebration of fertility and an excuse for an orgy — assuming the Romans needed an excuse, of course.
The more formal part of Lupercalia was a ceremony (if that's the right word) in which men ran through the crowds with goatskins, hitting people with them at random. This was supposed to promote fertility, a belief referred to in the opening scene of Shakespeare's Julius Caesar, which takes place "upon the Lupercal", where Caesar is contriving to get his barren wife so blessed.
The exact relationship between Lupercalia and the later Valentine's Day celebrations are uncertain. It's possible there was a direct carry-over, but it's likely that this was a time for fertility celebrations. Although it seems hard to credit, mid-February marks the first stirrings of spring, the time when, as we know, a young man's (or woman's) fancy lightly turns to thoughts of love — or, failing that, of a roll in the hay at least.
In the 14th century, Chaucer referred to the tradition that this day marked the mating of birds:
For this was on seynt Valentynes dayWhen every foul cometh there to chese his make [choose his mate]
and this may have encouraged similar behaviour in humans. Customs connected with love were certainly well established by Shakespeare's time. In Hamlet, one of the ballads Ophelia sings when she's mad begins:
To-morrow is Saint Valentine's day,All in the morning betime,
And I a maid at your window,
To be your Valentine
This refers to the tradition that, if you get up early today, the first face you see is destined to be your True Love. Though presumably only if it's an appropriate face, of course.
Another tradition was the Valentine lottery, an ancestor of the modern swapping party, where you picked from a box the name of the person you'd be taking home from the dance. They didn't have car-keys back then. Robert Burns wrote about this in the 18th century:
Yestreen at the Valentine's dealingMy heart to my mou' gied a sten,
For thrice I drew ane without failing,
And thrice it was written, Tam Glen.
And what of the ubiquitous cards and gifts to the loved one? This is actually recorded as early as the 17th century. Of course, the cards would have been home-made, but the custom caught on to such an extent that, by the 19th century, the Royal Mail was taking on extra casual workers in the second month of February to deal with the volume of cards being sent.
Things have certainly changed in recent years. Until just a few decades ago, Valentine's Day was purely for finding a lover, not for celebrating an existing relationship. The custom was to send an unsigned card to the person you fancied and hope they guessed it was you. And, of course, that they were pleased about it. If they weren't, it was probably just as well you could deny it.
Valentine's Day has been over-exploited recently, but it's definitely not just a Hallmark holiday. Sending Valentine cards is a time-honoured tradition, but if that's too modern for you, there's plenty of older ones that could be revived. The Lupercalia orgy, anyone? Get your goatskins out.