How does deontology apart of the criminal justice system?
Deontology, as I understand it, is the belief that right and wrong are derived from the nature of and motive behind the act (in this case, probably the crime). Your question is, how does that idea work in the criminal justice system. I'm not sure it does. It's true that motive is always a consideration used by both sides in criminal proceedings, and those motives may be considered in determining innocence and guilt as well as severity or leniency of punishment. However, in general terms the law functions as a right and wrong, black and white guideline of behavior. Choosing to disregard a law, even out of pure motives, is still breaking the law and the offender must still be held accountable.
In life there are probably exceptions, such as a husband driving with excessive speed to get his wife to the delivery room, when punishment (in this case, a speeding ticket) is waived. However, the criminal justice system works within the rules of law. If a law has been broke, there is a penalty, though altruistic or humanitarian motivations may be factored into the equation. The law is the law; and, motives aside, one who breaks the law must be prepared to face the full consequences of that act.