From The Week:
If you say “I know,” what you mean by it depends on how you say it. If your spouse says, “My mother is coming to visit,” and you say, “I know,” does that mean “You’ve told me this already and I don’t feel like talking now,” “I’ve already made a grocery list for her,” “I’m aware and not looking forward to it,” “I’m aware that you’re looking forward to it and I’m happy for you,” “I’m aware that you’re not looking forward to it and I’m commiserating with you,” or what? It depends on the intonation. When you hear it in “I know, right?” the emphatic intonation shows that this is a fact that you are very aware of and find quite striking.
If you say “Right?” it can mean “Is that correct?” but it can also mean “Do you agree with me?” It reaches out to the other person — it requires a response, but it gives the other person the upper hand. Of course, when the person has just told you the thing you’re saying “Right?” to, you’re obviously not literally asking if what the person told you is correct. The “Right?” gesture is referring to the “I know!” gesture: you’re asking the person to confirm the reaction you have to it. You’re trying to build a shared experience, a social bond. The fact of asking for confirmation also implies that the topic may be subject to question or in some way not obvious — that other people are surprised by it, or perhaps that you were.
So “I know, right?” communicates first that the fact is striking and impinges significantly on your personal experience, second that you are seeking confirmation of its strikingness, third that you are presenting it as something that is not universally obvious and agreed upon even though it should be, and fourth that you are seeking to create a bond of shared perspective and emotion between you and the person you’re talking to.