Bankruptcy does not write off criminal fines or restitution. But it can help by writing off other debts so you can pay crucial expenses.
The automatic stay immediately stops most collection actions when you file bankruptcy. But it doesn't stop a "criminal action or proceeding."
Three ways bankruptcy can help: 1) write off debts to focus on defense costs, 2) pay only the most important debts and expenses, and 3) reduce chance of related civil liability.