Actually, I will say... it DOES matter.
I am currently a medical student. I took many community college classes when I was in high school over 10 years ago. At that time, I was just taking classes for the heck of it (so that I wasn't bored in the summers). I didn't do very well and got mostly 'B' and 'C' grades at that time.
Ten years later when I was applying to medical school (after finishing my degree at a university, and working on a master's degree even)... I had to report all college grades to the medical schools I was applying to. This even included all the community college courses I had taken from 1996-2000. It really brought down my average GPA significantly and made me less competitive for medical schools... even though it was so long ago.
The bottom line is that it is okay to take community college courses while you are in high school, but be aware that those grades will affect you in the future. If you are a very hard-working student and can get good grades... then you should be absolutely fine. However, if you are just taking classes because you are bored and don't really feel like doing homework, then it can affect you later. So make the decision based on how much you trust yourself as a student to do well. If you are in your early stages of high school (like 9th or 10th grade) then don't bother, as it will be hard for you to gauge your competency in community college courses. But if you are in 11th/12th grade and are taking AP and other advanced courses in high school, then taking a few community college classes may be perfectly fine and a good way to prepare you for college. Good luck!