"Mary Sue" is an archetype of fiction (usually used unintentionally by the writer). The term is used mostly in a derogatory manner. It's, essentially, a character without flaws. A character that's just a bit too perfect, and seemingly can do no wrong, essentially makes no mistakes, and shows no weakness. Basically always a "lawful good" character that's nice to everybody.
Writers, even experienced ones, sometimes mistakenly make one of their major characters like this, perhaps in a misaimed attempt at making a likeable character that can be admired and rooted for. A hero of sorts (even if the character never does anything of great importance or performs literally heroic acts.) Sometimes the character is physically weak, but essentially a saint and philanthrope who loves everybody and is always kind and helpful. Sometimes the character is an actual action hero, an ace, who kicks villains' collective asses and always saves the day. A hero to be admired and adulated. Most usually they have no character flaws, and always act in the correct way depending on the situation.
The problem with these characters is that, somewhat ironically, they may end up feeling unlikeable. The complete opposite of what the writer intended. By being too perfect, too nice, and with literally no character or any other flaws, the character may end up unintentionally feeling distant, sappy, and unrelatable.
The Star Wars movies provide (at least) two prominent examples. In Episode I, the child Anakin is considered by most critics to be a perfect example of such a "Mary Sue" character, and he is almost universally, if not outright hated, at least disliked. In the new Episode 7 the character of Rey is also seen by many as a flawless "Mary Sue". She is not universally disliked, but the general feeling seems to be at the very least that of indifference. She doesn't make much of an impact, even though she's supposed to be one of the main characters.
Another example, perhaps one of the most infamous "Mary Sue" characters, appeared in the first seasons of Star Trek: The Next Generation. Namely, the character of Wesley Crusher, who has been almost universally deemed insufferable.
I think that the major problem with "Mary Sue" characters is that the viewers feel no empathy for them. Empathy is a big psychological aspect that makes fictional characters likeable or dislikeable. When a character has flaws, be it personality flaws or otherwise, if it's well written and well executed, the viewer may feel empathy for that character. (Although it's also very possible that certain flaws make the character dislikeable and even disgusting. This may be intentional, if well done, or unintended if poorly.)
When a character is too perfect and flawless, it doesn't trigger empathy. It may not trigger any strong emotions at all, which may leave the character uninteresting and give a feeling of indifference at best. At worst the character may end up being hated for being just a tad bit too obnoxious.
Another problem with these characters is that they tend to lack depth, making them flat and hollow, with no realistic personalities. Being flawless is not a personality trait. They don't feel much like actual real human beings.
That's not to say that a flawless character is never liked. Superman and Indiana Jones are probably examples (at least in their earlier incarnations.) It's just that it can be hard to pull off successfully. (In the case of Indiana Jones, the movies not taking themselves too seriously helps. In the case of Superman... well, I don't really know.)