The general rule with respect to fines and court costs in criminal cases is that fines issued against the Debtor as punishment for the crime are not dischargeable in either a Chapter 7 or Chapter 13. This includes fines in a criminal sentencing order or restitution set out in a criminal sentencing order. Although fines from a traffic ticket are not discharged, a fine imposed by a municipality as a result of a red light or speed camera are fines resulting from what has been decided by most courts as a civil action, and therefore these fines are dischargeable.
Fines that are related to court ordered reimbursement of governmental expenses are dischargeable in bankruptcy. Examples would be a fine to reimburse your city for cutting your grass after you were cited for the lawn being overgrown. The fine is considered an attempt by the municipality to recoup an expense and is civil, not criminal, in nature. It can therefore be discharged.
Another common example of a government imposed debt is debt related to overpayment of public assistance benefits. These claims are civil in nature ( a claim for reimbursement of money paid), and therefore the claim can be discharged.
It is always a good idea to contact an attorney who is knowledgeable about the ins and outs of Chapter 7 and Chapter 13 bankruptcy when you cannot pay government debts, including criminal reimbursement fines or court related fines and costs.