There are many stories and theories related to Valentine's day and its origin. Some connected Pagan stories with it, others connected to marriage.
The most prominent story was related to St Valentine of Rome who lived in the 3rd century AD.
At the time, Emperor Claudius II banned marriages saying that it distracts men and made them bad soldiers. St Valentine's believes that it was wrong. He broke the rules and conducted several marriages in secret.
After the emperor found out, he sentenced St Valentine to death. While in jail, he was in love with the jailer's daughter, He sent her a letter signed "From your Valentine" before his death.
Celebration of Valentine's day began in the middle of February in Rome where Romans had a festival called Lupercalia which marks the beginning of spring.
Church wanted to turn this into a Christian celebration as a tribute to St Valentine. Couples used the saint's name to express how they fell to their loved ones.