Make full (and strategic) use of discovery. What is discovery? As its name suggests, it's the legal mechanism for gathering evidence that may help exonerate you or refute the prosecution's evidence. Documents, surveillance video, written statements, and oral testimony can all be gathered using various discovery tools such as depositions, subpoenas, and interrogatories.
Negotiate with experienced (and inexperienced) prosecutors. Many criminal cases are resolved through plea bargains. In a plea bargain, the defendant agrees to plead guilty to a lesser charge in exchange for a better sentence. If a plea bargain is a possibility for your particular case, a criminal defense lawyer will know how to deal with your local prosecutors, including when to hold out for a better deal and when to advise you to take what's on the table.
Know how the local courts operate. Every jurisdiction (and even every courtroom) has its own rules, its own judges, and its own unique culture. A lawyer familiar with the courts where you are being charged will have invaluable insight into the local system and what needs to be done before, during, and after the resolution of your case.
Figure out ways to delay or expedite your trial. Depending on the circumstances of your case, you might want to hurry up and get things over with -- or you may want to delay trial as long as possible to gather evidence or get your affairs in order. A criminal defense attorney will be able to help you decide and implement a timeline that works best for you without hurting your case.
Help to expunge your conviction (if possible). If you are convicted, or plead to a lesser charge, a criminal defense attorney can also help you clean up your record through expungement. But keep in mind, this may not be possible in every situation.
No matter how minor or serious the crime, an experienced criminal defense attorney will be able to assist you in every step of the process. Many lawyers offer free or low-cost consultations so you can ask all the questions you want to before hiring one.