I don't know if I understand the question correctly. I assume you mean to go to community college for 2 years and then transfer to a 4-year college to finish your undergrad degree.
It depends on your major, your grades, whether and what grad school you want to go after undergrad degree. While it's hard to generalize, unless your goal is to go to very specific grad schools, it's OK to do the first 2 years of your undergrad in a community college. Hope I understood what you were trying to ask and helped with the answer. Good luck!