use of names
When the character is in a group the use of names in dialogue is rather necessary. In this instance literature does not quite reflect reality: in a realistic situation you would not keep saying "Well, Euripides, I think - " "Of course, Euripides, I see that - " "Euripides, when you put it like that - " etc. In reality you would rely on physical prompts to tell people who you were talking to directly: the inclination of your eyes, a gesture of the hand: unspoken signals that may, if used excessively, gum up a piece of writing. But in a piece of writing, repeating the character's name over and over is unrealistic and undeniably tedious. Look to strike a balance between the use of given names (or even pet names) and nonverbal prompts to keep the dialogue on a level with smooth, polished literature but recognizable as reflecting reality.
use of character relationship
This gets me probably more than the excessive use of proper names. It may be a mere pet peeve of mine: I will let you judge. Very few people, except perhaps Mrs. Bennet, can get away with referring directly to a sibling as "sister" and "brother" all the time in conversation. Typically, brotherhood and sisterhood are relationships that people do not consciously think about, nor, when they do, do they tend to assign "brother" and "sister" a place of proper noun-ship. In some time periods and cultures you can get away with this on occasion (Mrs. Bennet) but in my perusals of writing I have found it to be often the mark of amateurism. Avoid referring to the obvious. This also goes for an excessive use of "mother," "father," "lord," and "lady," though those titles are closer to being proper nouns in some instances than "brother" and "sister" might be and, as such, have a little more leeway. Again, look for a balance between realism and a translation from the image in your head to the written word to the reader's imagination.
judging by emotion and situation
I gave you some don't-do examples, now I'll try to give you some examples in actual settings. Dialogue encompasses the entire range of human emotion and just about every circumstance humans can find themselves in. Names will be used (or not used) differently depending on these factors, and they can mean different things depending on these factors.
Anger. Everyone knows that you are only given a middle name so you will know when your parents are mad at you. Calling a person by name is a way of grabbing hold of them - in the right tone, it acts in lieu of a physical shaking.
“We need a Caesar! If you can see another way, God help you, but we cannot. Rome cannot help us—she made that very clear. She can barely help herself.” There was a heavy silence, hollow and dark; Lord Alan’s next words fell in the silence like the ghostly pall of snow upon his heart. “We are alone, Ambrosius.”
Contentedness. When God is in his heaven and all is right with the world, you don't tend to refer to your friend by name while talking to him. You don't need to get his attention: you already have it, and you're both in a happy state of friendship.
Love. Again, pet names aside (and those can be many and varied and are up to the discretion of your imagination), people in love don't tend to refer to each other by name when conversing. They know intuitively that their minds are linked and have no need to draw the person's attention.
Fear. When you are afraid every moment counts: you won't take the time to string out the entire name of a Spanish character - you will stamp him by his short little Christian name and that will be that.
Embarrassment. Avoid names. Using names is like making eye contact, and when you are embarrassed you do not want to have anything to do with the other person.
Extreme happiness. Unlike contentedness, when you are absolutely, full-to-the-brim happy, calling out the other person's name acts as a relief and to link the other person with your own ecstasy.
These are just some random feelings and situations that I plucked out of the dark attic of my mind. Again, think about realistic situations in which there is dialogue and then think how best to translate that into writing. Things will have to be tampered with when they go into writing otherwise something will be lost in translation (such as nonverbal indicators), but in general keeping a firm touch of reality goes a long way to keeping tabs on names in dialogue. It may be apparent in these examples I gave that I steer away from using proper nouns in dialogue. I do that, not because I think it is taboo, but because people don't usually speak that way.
Sum up: keep in touch with reality, attend to period-accurate address, and maintain a good feel for when proper nouns are used by what emotions in what situations.