Some of the best opportunities for effective criminal defense work occur at the earliest stages of a case. If you consult with a criminal defense attorney before charges are filed, or at the earliest opportunity after an arrest, you may be able to position yourself for a better resolution.
Negotiating a Dismissal - If there is a patent problem with the case that is being brought against you, a criminal defense attorney may be able to contact the prosecutor before charges are authorized, explain the problem with the case, and secure a dismissal of the charge before the case begins. This becomes more difficult after charges are filed, as the charges may be authorized by a different attorney than the one handling the file, the case will be progressing through the court system, and a prosecutor might prefer to see how the case plays out through that system instead of offering a quick resolution.
Negotiating a Favorable Plea Bargain - Even when charges are valid, it is sometimes possible for a criminal defense attorney to speak with a prosecutor before charges are authorized, and to work out a deal whereby a client will enter a guilty plea to a specified charge, perhaps with an associated agreement as to the sentence recommendation that the prosecutor will make.
Assisting the Police or Prosecutor - If you have information or evidence that may help the police or prosecuting attorney in other cases, you may be able to arrange to offer that evidence or to otherwise work with the police in ongoing criminal investigations. Such cooperation will often help a defendant at sentencing, and may also be helpful to obtain a good plea bargain or in some cases an agreement that charges won't be filed.
Avoiding "Policy" Problems - Some prosecutor's offices have "no plea bargain" policies for certain charges. Once those charges are authorized by the prosecutor, it is usually extremely difficult to convince a prosecutor to deviate from the policy. However, if a criminal defense attorney contacts the prosecutor before the charge is authorized, it may be possible to arrange for a charge with does not implicate a department policy, and leaves the prosecutor with greater flexibility to plea bargain.
As stated on expertlaw.com.