Others have said that this is used as a shortening of something along the lines of "I agree with this" or "this expresses my thoughts", but I believe it to be used as a synonym of the word ditto. This may seem like it means the same thing, but I think it's more similar to the concept of a reference (in computer science, I'm not sure how else to describe it), where one word or phrase represents a (usually) larger text or concept. In this case, a reply of "this" would be referencing the parent post, so an unreferenced comment would be an exact copy of the parent post. Of course, this would be seen as odd or confusing, leading to the use of the words "ditto" and "this." I also think that "this" could be seen as a derivative of "I came here to say this", but with the poster retrospectively realizing that they agree with the opinion instead of holding the opinion and then finding out that someone else had already posted it.
Socially Normal Conversation (on the internet, anyways):
"He's actually focusing on sensationalist politics, when he should be focused on our long-term goals."
"This." / "Ditto."
Somewhat Implied, Socially Abnormal Conversation:
"He's actually focusing on sensationalist politics, when he should be focused on our long-term goals."
"[I completely agree that] He's actually focusing on sensationalist politics, when he should be focused on our long-term goals."