If someone "has it coming" for them, it's kind of like saying they are expecting something to happen to them, good or bad. For example
john: "Remember that teacher that used to slap her students in grade school? "
mary: "Yeah! what about her?"
john: "I heard she broke her leg! She got hit by a car!"
mary: "Oh really? ...well, she had it coming for her.."
That is a negative example. I can't really think of a positive example haha, if there are any haha.