I did this. In addition to saving money, I knocked out 95% of my gen eds in small classes, rather than enormous lecture halls. If you're going to a good community college, it's a great way to get some more in depth attention. It also seemed helpful for some of the younger, less serious students to be in the same room as students who were not also 19 years old and screwing around. I was in the social work program and there were a lot of older students, international students, people from varied backgrounds. I would never have gotten that at the state school I transferred into my junior year.
One thing I will say, though, is that you want to talk very carefully with the school about the way things will transfer over. My community college had specific agreements with the school I transferred into (in Illinois) that the gen eds I took would match up to the gen eds they offered. When I got there, I was only missing 2 classes, both of which were specific to the 4 year school and not offered by the 2 year school. It does not always work that way. Sometimes the math classes you take in community college do not fulfill the requirements of the 4 year college and you end up having to re-take things. Since I'm not a fan of math, the only thing worse than having to take algebra and a statistics class in the first place would have been having to do it over again.