Words like "baby", "sweetheart", "darling", and "dear" are sometimes used between couples in place of each other's names:
Come here, baby.
Hello, darling. How was your day?
These words are called "terms of affection". It can sound more sweet and loving to use these words than to call someone by name.
Sometimes people use these words for someone who they're not in a close relationship with, but those are tricky cases. For the most part, you should only use terms of affection for someone like a lover, spouse, or sometimes for your child.