The roots of this holiday extend further back than the 19th century. However, there are a few events that happened during this century that add to the texture of this holiday. And to many of the traditions we now use today.
The primary figure that we should recognize is Esther Howland who received her first Valentine card in 1847. Her family owned and operated one of the largest book and stationery stores in Worcester, MA. She decided she could make similar cards to market in the United States. Esther ordered her supplies from England and started selling her cards the next year. In 1850 she advertised these cards and hired staff to help her keep up with the orders. She retired in 1881 and sold her business to George C. Whitney Company.
Commercial cards took over the hand-made single card from folks around 1880.
St. Valentine's Eve was celebrated in the earlier part of the century for many years. Different countries would have different customs. One such custom was in England where the single men and maids would be gathered, each with a card they'd made. Here's a quote from "The Book of Days" by Robert Chambers ©1864
'On the eve of St Valentine's Day,' he says, 'the young folks in England and Scotland, by a very ancient custom, celebrate a little festival. An equal number of maids and bachelors- get together ; each writes their true or some feigned name upon separate billets, which they roll up, and draw by way of lots, the maids taking the men's billets, and the men the maids'; so that each of the young men lights upon a girl that he calls his valentine, and each of the girls upon a young man whom she calls hers. By this means each has two valentines ; but the man sticks faster to the valentine that has fallen to him than to the valentine to whom he is fallen. Fortune having thus divided the company into so many couples, the valentines give balls and treats to their mistresses, wear their billets several days upon their bosoms or sleeves, and this little sport often ends in love.'
I'm not aware of any of events, such as the one previously mentioned, today. However, our children today give Valentine's Cards to all of the classmates in school parties.
I can't find any direct information on when flowers and chocolates started to become a part of the tradition but I did find sources that mentioned small gifts being given.
If you'd like to see some of Esther Howland's cards here's a link for you.