Carnegie Mellon University’s teaching center lists several reasons why students complain about grades. One is: “The performance criteria that are used to distinguish among different grades are not clear.” One piece of its advice is to “explicitly identify what distinguishes basic performance from exemplary on the assignment statement.”
The tool for this is a rubric handed out with the assignment. With it, the center says, students “know the target they are aiming for.” They also “are less likely to be surprised.”