On the surface, the difference between "good" knights and "bad" knights in Malory's Le Morte d'Arthur depends on those knights' adherence to the chivalrous code, the code of ethical behavior that a knight errant was supposed to follow. Knights errant were, ideally, knights that traveled the countryside looking to perform chivalrous acts. In general, the knights of the Round Table were supposed to be knights errant.
Knights errant stood in contrast to knights who sought personal glory or gain from their actions. Such knights fought for their own purposes and did not follow the chivalrous code. Sometimes these "bad" knights were knights that were fighting against the king; or knights that took women against their will; or knights that killed other knights by magic or treachery; or knights that did not treat fallen enemies with courtesy or mercy, as dictated by the chivalrous code.
The problem with Malory's depiction of the knights errant in Le Morte d'Arthur is that none of the "hero" knights (e.g., Sir Gawain, Sir Lancelot, Sir Gareth, Sir Tristram, etc.), save for Sir Galahad, consistently behave in a manner in keeping with the chivalrous code. While none of these hero knights are as "bad" as the evil knights found in Malory, they at different times exhibit behavior that ranges from mild violations of the code to outright villainous behavior, even behavior that goes against their king and cohort.
In this sense, the line between the behavior of the "good" knights and the "bad" knights in Le Morte d'Arthur is blurred. The knights errant who are supposed to be following the chivalrous code often violate that code for their own purposes, and in this way they are nearly as unethical as the "bad" knights, i.e. those who do not follow the code at all. The difference between the "good" knights and the "bad" knights is that the knights errant who stray from the code may be able to make amends, as Sir Lancelot attempts to do, whereas those knights who do not at all follow the codes make no such attempts.