Grades are an indication of how well you can take a test.
They are NOT an indication of how well you learned the material.
Actually, it's not as clear cut as that. Tests have value insofar as they have validity.
More specifically, a good test has construct validity in that it accurately measures whatever concept that it's supposed to measure - for example, a test that's supposed to measure general intelligence actually measures general intelligence rather than measuring memory ability.
Next, a good test needs criterion validity in that its measurement accurately predicts future success related to the contruct its attempting to measure - for example, doing well on a test on network topology means that the test taker will do well in the Real World in an IT gig by creating a good network topology. Notice I didn't say the test was paper-and-pencil. An applied test on the subject could have a high level of criterion validity.
A good test has discriminant validity in that it accurately differentiates between the people who have a high grasp or ability of the material being measured from the people who have a low or moderate graps or ability of the material being measured.
A lot of the debate about the value of standardized testing really centers on criterion validity. There's no doubt that most standardized tests have construct and discriminant validity. The question really comes down to if doing well on a bunch of word analogies and abstract mathematical shortcuts for the SAT or GRE really is related to college or grad school success. I'm skeptical, at least when it comes to certain disciplines. In my opinion, the LSAT at least has face validity, since it measures a person's ability to parse arguments and language, which are skills any attorney needs. Furthermore, I think this is really the issue that needs to be discussed with teacher evaluations and No Child Left Behind. If the standardized test really isn't measuring skills that students need to truly be successful, why evaluate teachers on teaching it? But I digress.
It's not as black and white as saying testing is good or testing is bad. I've taken tests that lacked the validity mentioned above and I've taken tests that were very much validated. The former were worthless; the latter served their intended purpose of evaluating me.
To answer the OP's question, look at grades as being important because they are a means to an end. When you're straight out of college, they carry some weight, especially if you plan on going to graduate or professional school. However, five years out of school, your tangible skills and experience are going to be much more important. I've never heard of a college or graduate program rejecting someone because his or her grades were too high. With that said, colleges and graduate programs, as well of course as employers, are going to be looking at more than your grades. My advice is to maintain great grades, but also bust your ass and take every opportunity to learn tangible skills and get experience.
P.S. I got accepted into a reputable PhD program with a 990 on my GRE, so perhaps I have a bone to pick with standardized testing.

Or perhaps the department I got into doesn't really care as much about GRE scores as other programs and departments.