Valentine’s Day is a modern holiday, as it has been widely celebrated only since the mid-1800s. But it has a long prehistory that goes back all the way to the year 269 CE. It is said that on the 14th day of February in that year, St. Valentine of Rome was killed by Roman officials. It’s not clear why he was killed, but a theory (with little evidence behind it) developed much later that it was a punishment for performing the marriages of soldiers who were not allowed to be married. 
At some point, Valentine’s Day began to be observed in the memory of this saint, but it was not associated with romantic love until more than a thousand years after his death. Many factors played a role in making Valentine’s Day a celebration of love. One of these was the cultural influence of Muslim-ruled Spain on Western Europe in the Middle Ages.
For a person to express his or her love (romantic or otherwise) for someone is not only permissible but encouraged in the Islamic tradition, as long as this is done in a way that does not violate Islamic regulations. There are many narrations about the Prophet Muhammad ﷺ’s candid expression of love toward his wives, his children, and his followers and supporters.
These narrations tell us of his variety of romantic gestures toward his wives. In the case of his wife ‘Ā’isha (رضي الله عنها), for example, there are narrations about the Prophet ﷺ playfully racing with her; saying “‘Ā’isha” when one of his followers asked who was most beloved to him; kissing her, even while he was fasting; laying down with his head in her lap; and drinking from the same spot on a cup that her lips had touched. 
This brief list of examples shows that the Prophet ﷺ expressed his love for his spouses and, by implication, instructed his followers to do so as well. There was enough emphasis on this for it to become a topic of study for many Muslim thinkers. Some of these who wrote about love include al-Jāhiz (d. 868; Treatise on Love and Women), Ibn Sīna (d. 1037; Treatise on Love), Ibn Hazm (d. 1064; The Ring of the Dove), Ibn al-Jawzī (d. 1201; Dispraise of Lowly Desire), and Ibn al-Qayyim (d. 1350; The Garden of Devoted Lovers). 
A common thread in these works was the insistence that expressing love is not in and of itself something to frown upon; it is only shameful when done inappropriately vis-à-vis the parameters set down by the Islamic tradition. Ibn Sīna and Ibn al-Qayyim took their reflections a step further and asserted that love at the level of human expression (e.g. romantic/sensual love between a husband and wife) was a means to achieve the ultimate spiritual goal: a relationship of love with Allāh.  Essentially, this meant that pursuing and expressing love is “ennobling” (i.e. it is a noble thing to do with a noble objective).
This understanding shaped the literary culture of Muslim-ruled Spain in particular. It became very common for both men and women to express their love and propose for marriage by composing and reciting poetry.  Arabic love epics such as The Story of Bayād and Riyād were composed and read in royal courts, even those of the more “conservative” Muslim dynasties such as the Almohads (r. 1121-1269).  And Ibn Hazm’s The Ring of the Dove, possibly the most famous work on love and sex in Islamic history, was written in this environment. 
There are many indications that this culture of “the ennobling power of love” in al-Andalus influenced the culture of “courtly love” that developed in nearby France. Modern scholars such as Alois Nykl and Lawrence Ecker have supported this theory by comparing Andalusian love poetry with the poetry of the troubadours―poets who are credited with spreading the idea of “courtly love” (i.e. the expression of love as a noble act) in France. They found as many as 32 matching motifs. 
They supported their argument by pointing out that the historical situation was very favourable for such an influence. Firstly, the troubadours were known to travel in al-Andalus.  Secondly, the Christian reconquest of Spain was at its peak, so there was a unique situation in which north/central Spain was ruled by Christian rulers (e.g. Alfonso the Wise) who were culturally influenced by the Muslims but also had very close ties to the courts in Europe, especially France.  Thirdly, the earliest known troubadour, Duke William IX of Aquitaine (d. 1127), not only received the influence of al-Andalus but had also travelled to Syria and Palestine as one of the leaders of the Crusade of 1011, and was potentially exposed to even more of the Muslims’ culture and attitudes toward love. 
But even before learning about the Muslims’ attitude toward love, the Europeans had made some assumptions. There was long tradition in the history of Christian writing, going as far back as John of Damascus (d. 749), to portray Muslims (men in particular) as hypersexual. By the Middle Ages it was established that the Muslims were “morally feeble”, “unrestrained”, and “effeminate” not only because of their sexual activity (which they weren’t ashamed of), but more generally because they were expressive about their love.  (Note that the Muslims were called “effeminate” because, in the Christian tradition, expressing love was a weakness that only women or “women-like” men had.)
One 12th-century writer thought he was belittling Islam by saying that it was a religion that tells humanity that “making love you will establish by law” and “let food abound and let love be set free”.  Thus, when parts of France began to soak up Andalusian culture, the French were immediately tied (in a derogatory way) to the Muslims. In the early 1300s, for example, the English author of the historical romance Richard Coeur de Lion wrote that Muslims and French Christians were allies and very similar in that both were “deceitful” and “materialistic”.  Even as late as the early 1900s, the Canadian-born priest Father Alexander Denomy (d. 1957) was writing that the European concept of courtly love was inspired by the philosophy of love outlined in Ibn Sīna’s Risālah fi’l-Ishq (Treatise on Love)―and that it was unacceptable. 
Thus it was the concept of expressing one’s love that the Muslims contributed to European culture, not so much Valentine’s Day itself. In fact, Valentine’s Day as we know it did not even become a popular holiday until the mid-19th century, by which time when Muslim lands and cultures had very much been colonized by European powers.
The earliest known instance of an association between romantic love and St. Valentine was made Geoffrey Chaucer (d. 1400), an English writer, poet and philosopher who is best known for The Canterbury Tales. Chaucer wrote two lines of poetry in which he associated the mating of birds with St. Valentine, but not with the date of February 14 in particular. 
It was in the year of Chaucer’s death that Charles VI of France supposedly issued a charter which established a “court of love” on February 14. At this gathering, the ladies of the royal family tried to help reconcile lovers whose relationships were falling apart; young men presented love songs that they had composed to an all-female panel of judges; and both the rich and poor were invited to take part, which may have begun the spread of the notion of a romantic Valentine’s Day across France and, from there, across Western Europe. 
By Shakespeare’s time, as Ophelia mentions in Hamlet, Valentine’s Day was known as a day to celebrate romantic love.  Local folk traditions and poets―Oton de Grandon, John Gower, Christine de Pizan, Charles d’Orléans―kept this association alive until the mid-1800s.  That was when Valentine’s Day was transformed into the commercialized “Hallmark holiday” we know today, starting in the United States.
Beginning in major US cities in the 1840s, Valentine’s Day was marketed as a return to folk traditions, a day on which people could indulge in “more soul-play and less head-work”; in other words, it was a reckless, romantic, one-day revolt against the “calculated” way of life that had developed since the Industrial Revolution.  The holiday initially revolved around the exchange of “valentines” (cards), a practice that had already become popular in London since the 1820s. It was only the first of many ways that corporations have gleefully found to make money on the anniversary of St. Valentine’s death; $19.6 billion is expected to be spent on Valentine’s Day in 2018 in the US alone, and that number generally grows every year. 
In a sense, Valentine’s Day is a crystalized form of the European understanding of love, which originated in the Christian tradition and was shaped by the Islamic tradition and most recently by consumer capitalism. It can be argued that Valentine’s Day today represents a very materialistic and ritualistic approach to love, one that has spread not just in the West but also―somewhat paradoxically―in the Muslim lands (and elsewhere).
But uncritically taking part in Valentine’s Day is still a choice. On Valentine’s Day and every other day of the year, whether and how you express your love is determined by why you do so. Guided by the ideal example of Prophet Muhammad ﷺ and the profound reflections of the scholars in the Islamic tradition, love can yet be reoriented toward the end-goal of loving Allāh ﷻ and being loved by Allāh ﷻ.
 Leigh Schmidt, “The Fashioning of a Modern Holiday: St. Valentine’s Day, 1840-1870”, Winterthur Portfolio 28, no. 4 (1993): 210; see also http://www.history.com/this-day-in-history/st-valentine-beheaded.
 Sunan Ibn Mājāh no. 1979; Jāmi‘ al-Tirmidhī no. 388; Sahīh Muslim no. 1106; Sahīh al-Bukhārī no. 297; Sunan an-Nasā’ī no. 281.
 Joseph Bell, Love Theory in Later Hanbalite Islam (New York: State University of New York Press, 1979), chapter 1 (“Introduction”).
 Ibid., chapter 6 (“Love in the Works of Ibn al-Qayyim al-Jawziyya”); G.E. von Grunebaum, “Avicenna’s Risālah fi’l-Ishq and Courtly Love”, Journal of Near Eastern Studies 11, no. 4 (1952): 233.
 Asma Afasruddin, “Poetry and Love: The Feminine Contribution in Muslim Spain”, Islamic Studies 30, no. 1/2 (1991): 157-169.
 Cynthia Robinson, Medieval Andalusian Courtly Culture in the Mediterranean: Hadīth Bayād wa Riyād (New York, NY: Routledge, 2007), 110.
 Jean Dangler, “Expanding Our Scope: Nonmodern Love and Sex in Ibn Hazm al-Andalusī’s Tawq al-hamāma and Ahmad ibn Yūsuf al-Tīfāshī’s Nuzhat al-albāb fī mā lā yūjad fī kitāb”, Africa Today 61, no. 4 (2015): 17-20.
 Joseph Bell, Love Theory in Later Hanbalite Islam, chapter 1 (“Introduction”).
 María Menocal, “Close Encounters in Medieval Provence: Spain’s Role in the Birth of Troubadour Poetry”, Hispanic Review 49, no. 1 (1981): 55.
 A good example is that of Alfonso X, discussed in Simon Doubleday, The Wise King: A Christian Prince, Muslim Spain, and the Birth of the Renaissance (New York, NY: Basic Books, 2016).
 Ffiona Swabey, Eleanor of Aquitaine, Courtly Love, and the Troubadours (London: Greenwood Press, 2004), 29-30.
 Sara Lipton, “Christianity and Its Others: Jews, Muslims, and Pagans”, in The Oxford Handbook of Medieval Christianity, ed. John Arnold (Oxford: Oxford University Press, 2014), 423.
 John Tolan, Saracens: Islam in the Medieval European Imagination (New York, NY: Columbia University Press, 2002), 146.
 Suzanne Yeager, Jerusalem in Medieval Narrative (Cambridge: Cambridge University Press, 2008), 70-74. Interestingly, it has been argued that both the troubadours and European clergy viewed these French poets’ work as “dissent”; see Jeffery Russell, “Courtly Love as Religious Dissent”, The Catholic Historical Review 51, no. 1 (1965): 31-44.
 G.E. von Grunebaum, “Avicenna’s Risālah fi’l-Ishq and Courtly Love”, 233.
 Leigh Schmidt, “The Fashioning of a Modern Holiday”, 210.
 Peter Goodrich, Law in the Courts of Love: Literature and Other Minor Jurisprudences (New York: Routledge, 2003), 1.
 William Shakespeare, Hamlet, Act 4, Scene 5; http://nfs.sparknotes.com/hamlet/page_238.html
 Leigh Schmidt, “The Fashioning of a Modern Holiday”, 210.
 Ibid., 214.