Pharmacists in the US are really just managers of the “pharmacy department” of the store they work in. If a customer states, “I have X, do you have anything that will help?”, the pharmacist can recommend over-the-counter treatments for X. They cannot hand out prescription medications without a doctor’s authorization, nor can they diagnose an ailment on their own.
As others have pointed out, their most useful function in the US is to identify drug interactions, and to explain side effects. Before we had the WWW and the ability to look up this information ourselves, this was a critical role. Even now, the pharmacist is the best source for information about possible side effects, inactive ingredients in a medication, etc. (For example, I have severe reactions to aspartame. I’m not PKU, but aspartame gives me extremely bad headaches, so I try to avoid giving it to my children, just in case they have the same reaction. However, many chewable medications are sweetened with aspartame, so I want to be sure that if a doctor prescribes the “chewable” form of a medication, that aspartame is not one of the ingredients. If aspartame is there, the pharmacist can tell me and contact the doctor about an alternate form.)
In other countries, though, pharmacists have a lot more “power.” I lived in France for a few years, and really appreciated the fact that I could walk into a pharmacie, describe my symptoms, and walk out with medication to treat those symptoms in most situations. This is true for very common problems, like colds, flus, ingrown toenails, etc. I developed bronchitis once while I was living there, and happened to visit the wife of a pharmacist just as the bronchitis reached its peak. The pharmacist recognized my cough, and pulled an antibiotic throat lozenge off his shelf for me. He wouldn’t even accept payment–he said I should treat it as part of his wife’s payment to me for my assistance in translating her French materials into English.
In cases where the pharmacist recognizes that more extensive treatments are necessary, or where they can’t simply pull meds off the shelves as a cure, they tell the customer to go see a doctor.