Schools and grades count, at least to a degree. Colleges and law schools are pretty good about identifying the smartest and hardest working candidates, so, aside from trying to measure what a person learned in school, good grades at a rigorous institution can also be an indication of who is smart and has worked hardest.  There can, however, be many factors that diminish the importance of this element. Some people have to work while in school while others do not. Some have children to care for while others do not. And, the fact is, some people attend school when they are too young to really be mature enough to make the most of the opportunity.

For these reasons, the weight to be given to academic performance generally is more important for newer lawyers, and less important for lawyers whose actual performance as a lawyer can be measured by professional achievements. It is generally going to be more important for appellate attorneys and writing attorneys, since their work generally requires skills that are more similar to what is required in law school than what you need as a trial lawyer.

On the whole, though, at least some members of the firm you pick should be graduates from highly ranked academic institutions, and you will want to be really careful about lawyers from schools less than 10 or 20 years old. Ratings for undergraduate schools and ratings for law schools can be found here, that can give you a sense of what schools are well thought of, and those that are not.