For certain minor things, like a traffic ticket that doesn’t threaten your license or insurance premiums, you can handle it yourself; you’ll likely get the same offer from the prosecutor that your lawyer would.
For everything else, at least talk with a lawyer. Tell your lawyer the truth. Believe it or not, the truth can set you free. Your lawyer can’t effectively negotiate for you, or prepare for trial, unless he knows all the facts, good and bad.