In trying to trace the origin of Valentines Day, I have stumbled on so many different stories, which makes it extremely difficult to figure out its real origin. But the bottom line is that it is certainly a pagan tradition. Linking with it to St. Valentine is also another debate. While some people try to link it to him (probably to make it acceptable in Christianity) others reject any connection. Whatever the case is, we are NOT allowed to imitate the kuffar in any way. Thereby making the celebration of Valentines Day impermissible in Islam.
Allah (Subhanahu wa ta'ala) says in the Qur'an that, "And if any among you takes them (as Awliyaa' [friends and helpers]), then surely, he is one of them." (Q5:51)