It depends what you are looking for. If you need a trial lawyer, then you want one who has done and hopefully won a lot of trials. If you want a lawyer who creates contracts or who just works in transactions, you don't necessarily need someone who has ever been to trial (and many lawyers have never done a trial even after many years in practice). Generally, the most common needs for ordinary folks are criminal attorneys, divorce attorneys, will and trust attorneys, and accident or tort attorneys.
If you need a criminal attorney, you want someone who has probably done a lot of trials and who knows that aspect of the law. After I'd been in a juvenile delinquency court for a long time as a public defender, I saw a kid whose parents had a little money get represented by a lawyer who'd been a lawyer for a long time, but I'd never seen him in delinquency court. He basically pled the kid out to everything and I sat there dumbfounded, knowing that the kid could have entered a deferred entry of judgment program where the felonies the kid had committed would be erased from his record after a year. Luckily, the kid's lawyer didn't show up for sentencing and he was appointed to a public defender (not me) who withdrew his plea and got him into the right program. Every kid who didn't have money got a public defender or the alternate public defender or one of the other attorneys on the conflict list. We all knew each other and we all talked to each other and knew about all the programs because we worked in the same courtroom doing the same things day after day. Those private lawyers, who came in cold, knowing nothing at all, talked a lot and had a tendency to sound confident. The judge was always polite (more so than to me, but the judge and I had a history) to them, but they were always floundering. I still find that to be the case. Some attorneys who have worked in the court as a public defender or as one of the conflict attorneys and then moved on into private practice have the needed experience and may even know the judge (in a large county it may be impossible to really "know" all the judges, but you can always know the procedures for a particular county). But private attorneys who have done little criminal work and who have never worked for the public defender's office (or one of the conflict firms) should always be avoided. Remember, public defenders are actually more knowledgeable than most other attorneys in criminal law. Why? Because they do the same thing day in and day out and do it over and over again. But private attorneys who have that experience have done it and have the respect of their peers. Maybe they know the DAs and how to deal with a particular DA (which is a big, big deal). How do you know? Ask for their experience? How long have they been attorneys? How many trials have they done? Where did they do them? What kind of trials? If you are looking for a DUI attorney, someone who has done no DUIs and all felonies may not be the right person. If you are looking for a felony attorney, someone who has no felony experience but has done many DUI trials probably isn't the right attorney for you. A DUI attorney could do an adequate job in a felony case, but a DUI case is a misdemeanor case. While the evidence rules are the same, there are some fundamental differences between a misdemeanor and felony case that affect strategy. A DUI attorney might know about that (and probably should know), but isn't as experienced with it. If you are looking at charge that could send you to prison, you want someone who knows the felony game. But the real money in criminal law is in DUIs. Why? Because people with money tend to commit DUIs and a lot of DUIs get committed. People who commit felonies tend not to have money and will get the public defender. There are awesome private felony attorneys out there, but they probably do more DUIs than felonies.
There seem to be two types of attorneys in criminal law that concern me. Those that want to go to trial and those that want to avoid it at all costs. Both of those types of attorneys think the other kind lack something. I think it is wrong to avoid trial at all costs. Sometimes you have to go. But there are some that like it and take the gamble and what you say can influence a defendant either way, so you have to be careful and make sure it is the client's wish to go to trial or not to go to trial after educating the client. How do you know what kind of attorney this one is? Ask him or her. What are his or her feelings about trial? Etc. Hopefully, you want someone who is not afraid to go to trial, but who educates the client enough so the client can make an informed decision. You want an attorney who is customer service oriented and who can take his or her ego out of the equation. How do you get that? You have to ask questions about this and see what their answers are. A lot of people will give you the answers you want to hear, but you can tell to some extent from how they say it.
And that's the thing. An attorney has to lead the defendant or client through the legal process. But very important is educating the client. And remember that educating anyone is hard. You can't treat people like 5 year olds, but most clients know less about the legal system than a 5 year old. So you have to be good at and work around the egos of your clients (or in some cases, the mental problems and personality disorders of your clients). But lawyers are twice as likely to be introverts as the general population. As such, they may not be so good at personality recognition and be lousy at dealing with the personalities of their clients and, thus, not be able to educate the client. Or they won't give their clients the time of day. Sometimes you just have to list to your clients and give them the good the bad and the ugly, but talk about and get beyond their fears and tell them what they really have to fear and what they don't have to fear. To make a long story short, a lawyer needs to be able to talk with their clients and be there for their clients (although some clients call their attorneys a little too much). How do you find an attorney that will educate you and give you the time of day? Ask questions about this and see what they say. Don't be afraid to ask questions. The attorney is someone you pay for (if it is a paid attorney). Their job is to educate you and, if they aren't, don't feel stupid. Say you aren't understanding and take your ego out of the equation.
There are also attorneys that will blow sunshine up your ***. They do it to get you as a client and to get your money. After all, attorneys are out there to make a living and became attorneys, because someone said they'd make a good living. Attorneys are disappointed when they leave law school and suddenly realize that they won't make near as much as they thought they were going to make (I was) and then find out that they'll have to work their rear ends off to make what little they'll get. So they'll promise you the sun the moon and the stars to get you in the door. But you don't want sunshine blown up your ***. You want the best result possible. Unfortunately, the attorneys that make the most money are the ones who tell the client what the client wants to hear and not what the client should be hearing. How do you find such an attorney? You have to discuss this with your attorney. You have to be ready to hear the good, the bad, and the ugly and you have to tell the attorney that and be okay with it.
Divorce attorneys? There are many attorneys out there who specialize in that area. Some attorneys are professional assholes and some aren't. My advice, if you are going through a divorce, is to try to be as magnanimous as possible. The process is long and hard. Diplomacy is the key. If you are diplomatic and try to be nice, the other side will see that and go in that direction, too. Of course, the other side may not want to be nice. The other side may want to hurt you. If so, you want an attorney who can batten down the hatches and prepare for the hurricane that is to come. What kind of divorce attorney is he or she? Can she fight a professional asshole and be one herself if necessary? Or can she facilitate diplomacy if that is what is called for? You'll have some idea of where you are going when you decide to get a divorce, because you know your spouse better than anyone.
Wills and trusts? Generally, these folks write wills and trusts and facilitate the process of probate or invoking the terms of the trust when a person dies. They also do other things like living wills for medical purposes. During probate, they may have to go to a hearing in a probate court, but it is usually just a formality as all the paperwork is usually done by then. Usually, these folks are not trial lawyers. And a trial lawyer is not usually needed for this type of law. The trouble is when someone tries to challenge a will or a trust. (You know when your brother thinks he deserves more money that he's getting in the will, because of something the now deceased parent allegedly said.) This happens more often than you think. If there is going to be a contested hearing, you may want someone who has done contested wills and trusts before. To find out, ask questions.
Accident attorneys? If you were involved in an accident and want a pay out, the question is: How injured are you? If you have little back pains that maybe you had in the past anyway, you may want to settle out with the insurance company and you'll get more money that way. Avoid the attorney taking a 30% cut. But if the injuries are very severe, consult an attorney. Insurance companies are not in this to pay you money and are not here to give you correct advice. They are there to pay as little money to you as possible, but they also want to avoid a lawsuit, which can cost them much more that the eventual payout. Of course, you, as a layperson, will never really know what your claim is worth. First, consult a doctor and see what they say about your injuries. Surprisingly, doctors may actually know a think or two about accident lawsuits as they may have testified for their patients in the past (or even as experts). A lot of attorneys specialize in small payout accident injuries. But they take you in, often promising the world, and then you get a very small payout, 30% of which goes to the attorney (plus expenses, which could be considerable). If you know you are only going to get a few thousand dollars anyway, why would you want an attorney to get the lion's share of it? But if you aren't sure, you should always consult an expert, an attorney. My fear is that this expert also wants your money.
Also, remember that most payouts are very small from accidents. No one is satisfied except the lawyers. And don't expect $50 million from a little coffee burn from McDonalds. Everyone remembers that story. What they fail to realize is that the plaintiff was an elderly women who spent a week in the hospital (that's a lot of hospital time) and that she had to have several skin grafts. This was a very severe injury. Moreover, evidence was shown that McDonalds had been sued many times before for this same thing (hundreds of lawsuits, in fact), but they just never did anything to change it. Why didn't they change it knowing that hundreds of people had been injured and that this was a common thing? The damages were punitive and rightly so if McDonalds never did anything to make the coffee more safe. And the judgment was reduced to about 2 million (which is still a lot, but more in line with what it should have been). Most accidents rate a few thousand dollars. If you get rear ended, you haven't won the lottery. At best, you'll likely get reimbursed for your trouble, which isn't much.
In general, ask question after question. The more educated you are the better. At the start, you will not be educated. But you should go in with the attitude that you are ignorant of a lot of things and need to find out those things. You should talk to a lot of attorneys before settling on one. Attorneys come in all shapes and sizes and every attorney has a different opinion on something. Getting an attorney is a big thing. Although hopefully it won't cost what a house costs (although it will in some cases, but not for the ordinary guy), you wouldn't buy the first house you saw, would you? Nor should you get the first attorney you meet.
What about cost? Well, to some extent, you get what you pay for (except in the case of public defenders where you may get an exceptional attorney for nothing). However, the best attorneys aren't necessarily the best dressed with the best offices who ask for the most amount of money. I've always said, regarding criminal attorneys, that if I ever found myself in a scrape, like a felony case, I would never represent myself, but would get some renowned hot shot out of San Francisco or LA to represent me and pay $100,000 or so. But some charge much less. Some charge by the hour, but hourly charges can be padded. Wills and trusts are often done for a set fee. Many divorce attorneys charge a retainer up front (although a high retainer might be a red flag). Ask about cost and don't be shy. You are a consumer and this is a service industry.
Always remember that an attorney can hold you by the hand through the process, but the other side and the judge may have something to say about the outcome of your case. An attorney is not a miracle worker and maybe your facts are just not in your favor. So remember what an attorney is: Someone in your corner who knows the law, will educate you, and will fight for you. But even Mohammed Ali lost a fight or two.
And, while the above is probably true in all states, I am only knowledgable re: California.