If I know that person, then it's fine.
If someone I don't know recognizes me by name, it's a bit creepy.
On a related note, I absolutely hate it when cashiers thank you by name using the name on your credit card or loyalty card. It's completely fake and shallow.