Defendants who have done the act that forms the basis of their criminal charge often wonder whether they should tell their lawyers. Even if they remain silent, they are concerned that their lawyers will believe that they are guilty, and either won't want to represent them, or will do a poor job.
First, understand that what's at stake in your case is whether the prosecution can prove, beyond a reasonable doubt, that you committed the crime with which you're charged. That's a different question than asking whether you did the act that's involved. For example, if you're charged with robbery and you did, in fact, wrestle a purse from a woman on the street, you're entitled to an acquittal if the victim cannot identify you.
The key is the difference between factual guilt (what the defendant actually did) and legal guilt (what a prosecutor can prove). A good criminal defense lawyer asks not, "Did my client do it?" but rather, "Can the government prove that my client did it?" No matter what the defendant has done, he is not legally guilty until a prosecutor offers enough evidence to persuade a judge or jury to convict.
However, the defense lawyer may not lie to the judge or jury by specifically stating that the defendant did not do something the lawyer knows the defendant did do. (On the other hand, the lawyer cannot admit guilt against the client's wishes.) Rather, the lawyer's trial tactics and arguments must focus on the government's failure to prove all the elements of the crime.
Example: Sam is charged with shoplifting. Sam admits to his lawyer that he took a watch, as charged. Sam's lawyer realizes that the store's hidden camera videotape is fuzzy and practically useless as prosecution evidence. In addition, Sam's lawyer learns that the store's security guard was at the end of a long overtime shift and had been drinking alcohol. Sam's lawyer can use these facts in an argument for Sam's acquittal. Before trial, Sam's lawyer can argue to the D.A. that the D.A.'s case is too weak to prosecute. At trial, Sam's lawyer can argue to a judge or jury to acquit Sam. No matter what Sam has done, Sam is not legally guilty unless the prosecutor can prove it beyond a reasonable doubt. But Sam's lawyer cannot ethically state in his argument that Sam "didn't do it," only that the D.A. didn't prove that Sam did do it. While the line between ethical and unethical behavior may seem like—indeed, is—a fine one, it is a line that criminal defense lawyers walk every day on the job.
Defense attorneys are ethically bound to zealously represent all clients, those whom they think will be justly found guilty as well as those whom they think are factually innocent. (See Canon 7, ABA Model Code of Professional Responsibility.) A vigorous defense is necessary to protect the innocent and to ensure that judges and citizens—and not the police—have the ultimate power to decide who is guilty of a crime.
In truth, the defense lawyer almost never really knows whether the defendant is guilty of a charged crime. Just because the defendant says he did it doesn't make it so. The defendant may be lying to take the rap for someone he wants to protect, or may be guilty, but only of a different and lesser crime than the one being prosecuted by the district attorney. A defendant may have done the act in question, but the client may have a valid defense that would exonerate him. For these reasons, among others, defense lawyers often do not ask their clients if they committed the crime. Instead, the lawyer uses the facts to put on the best defense possible and leaves the question of guilt to the judge or jury.