This is a slang phrase used in Major League Baseball to describe an incompetent and ineffective hitter. It is a reference to former major league player Mario Mendoza, whose career batting average was .215. This expression is typically used on players who have a batting average of .200 or less. This is not a compliment in any way, and is only used to describe players whose hitting inabilities completely outweigh any other athletic benefit to the team.
The history of the expression begins in the clubhouse of the Seattle Mariners, where Mario's teammates teased him about his horrible batting. It began to be used within the clubhouse to tease other teammates, like George Brett, about their poor batting averages. George Brett told Chris Berman, a sports anchor, about it, and he used it on ESPN a lot in the 1980's. It has become a part of the game and has even been referenced in popular culture to apply to sub-par experiences.