Calling someone "dear" usually requires close familiarity or affection.
Often, a store clerk will call a customer "dear", but often customers will be annoyed at this.
Sometimes, a man will call a woman "dear" even if they are not close. Years ago this was tolerated, but more recently it is not acceptable. It is interpreted as not showing respect.