Ask friends for recommendations. What is the attorney's reputation in the community? Does he or she fight for their clients? Different cases require different talents. Some cases will be won or lost depending on legal maneuvers-eg. suppressing evidence in court after an unlawful search. Other cases, sometimes called "sentencing cases" cannot be won but the outcome or sentence can be dramatically effected by experienced lawyering. Many cases simply require firm pressure against the other side.
Remember that some attorneys rarely go to trial. If you have an attorney who isn't comfortable with the words "let's go to trial", then you are missing the ultimate leverage a defendant has - a trial attorney for an advocate. The district attorneys know who is and who isn't a trial attorney. They know defendants who are represented by an attorney that doesn't try cases will plead out clients no matter how bad the DA's offer. Unfortunately, there is a certain amount of gamesmanship involved in the District Attorney's evaluation of their cases. Winning is important. Justice is very subjective anyway and statistics are very important to some of the DA's.
It used to be common for attorneys to have general practices: a little criminal law mixed with a little personal injury mixed with a little business law, mixed with a little family law. These days, to keep up with constantly changing laws, better attorneys have tended to specialize in particular fields.
Santa Cruz Public Defenders are attorneys who work for one of three law firms which have contracts with the county to represent people who cannot afford to hire their own "private" attorney. The main public defender office handles the vast majority of cases and the others take cases if there is a "conflict of interest". (Usually one attorney or firm cannot represent two people charged together- an attorney's allegiance cannot be equal to both charged people: "He did it". "No, she did it!".)
Santa Cruz is lucky to have so many excellent public defenders. Some cities have few or none- and this is one of the reasons for the poor reputation of public defenders around the state. Another is that public defenders have nearly crushing case loads and cannot spend as much time meeting and talking with clients. This sometimes leads to mistrust or poor communication. But the public defenders nearly total immersion in fighting for clients day in and day out teaches the vast majority of these good attorneys how to be tough advocates for their clients.
I have the honor of having many public defender friends, colleagues and mentors. Sometimes people start with a public defender and later hire a private attorney. That can work well for people- but I have seen many poor private attorneys take over from excellent public defenders and have terrible results. If you don't have the funds to hire an attorney- work with your public defender and make sure you provide him or her with everything they need to defend you. For example- you know who could testify as your character witness for truth and honesty. You know who can help as your witnesses to the events that led up to your prosecution- make sure you get all names and addresses to your public defender so the witnesses can be contacted. Obviously, if you have a public defender who isn't fighting for you, than its time to find a private attorney who will.