This is a recently popular expression of agreement
a subtext. It is more than agreement with
an idea (observation, opinion); it is a friendly
assertion that the speaker has already had the same idea–as in, "yeah, I know"–but it goes further: it seeks validation for the speaker's claim of precedence, from the very person whose claim he's jumping. The subtext might be "Oh, you took
my idea; you should be agreeing with
ME, not vice versa."
Student: I couldn't pay attention to the lecture because
of that ball of sweat
hanging from the professor's nose.
Classmate: I KNOW, right?