You have to consider a lot of different things.
1. Money, are you trying to save money or is your major going to be able to pay off the eventual created student debt?
2. What is your major? Will you stick to it? How much will they make?
Personally, community college is great if you're trying to save money but most student tend to be there for 3-4 years typically so the 2 year community college idea is if you don't have any other life and are only working on your classes in community college, typically 15+ units will be needed to complete in 2 years.
I went with a 4 year school because I didn't need to worry about money and I knew my major would take care of created debt when I graduated and got my degree and career. I think it is definitely saving me time. But, also, consider the college you are going to as well. Will they be able to help you get a job quickly, how do they teach, is that teaching style fitting your learning style?
There are a lot of different factors that go into deciding between the two but most people boil it down to money. If you can afford going to a 4 year then I would suggest you do, it goes by much faster and you can get moving a lot quicker.