Your grades will undoubtedly be a significant factor in whether or not you obtain a judicial clerkship, particularly one in the federal courts or in appellate state courts. The judicial clerkship selection process is notoriously unpredictable. Despite the rumors you might hear, no particular set of credentials guarantees either that you will – or that you will not – obtain a particular clerkship. Judges are idiosyncratic, and there is no way to predict what aspect of your application may strike a particular judge favorably. Because of the close working relationship that develops within chambers, judges tend to give special weight to subjective factors such as personality or "chemistry." They may be dazzled by your tennis-playing ability or your former career as an opera singer. In any case, they will consider whether you are likely to "fit" within the atmosphere of chambers (i.e., how well will you get along with the judge, your co-clerks and – sometimes most importantly – with the judge's secretary), and whether your work style is likely to be compatible with that of the judge.
In sum: When applying for a clerkship, accept from the beginning the fact that you may not get one, or that you may not get the one you think you deserve, and that failure to get a clerkship is not a reflection on your abilities.