This depends on the community college and the coursework that you are taking. Many community colleges have very strong and transferable courses in the humanities and sciences and many have coursework that is not comparable. Community college work makes good sense in terms of reducing overall cost of your bachelors degree but pick and choose your courses wisely.
If you know that you are transferring to a four-year school, I would first, skip the Associates Degree, take the pre-req general education courses such as humanities and math but leave the pre-med coursework until you get to university. Community college faculty do not have the research requirement to achieve tenure and thus they are supposed to be excellent in day to day teaching. You can take advantage of this if you have weaknesses in things like math or english and be very solidly prepared to enter your pre-med courses at your university.
If you already have a degree, then taking your pre-med courses at a community college (as long as they are of sufficient depth and breadth) is not much of a problem for most medical schools in this country. Again, the strong teaching mission and emphasis on excellent teaching of most community colleges can be an advantage for the student who struggles a bit with the sciences. Just be sure that the coursework is of high quality.
Community colleges in many states (California, Ohio, Minnesota and Virginia come to mind) are very strong and have strong transfer links between their coursework and their state universities. This is a win-win situation if money is tight or if you need close attention from faculty.