Accreditation as a whole is a huge and complex topic. Universities are accredited at the university level. Specific departments and programs within an accredited university may or may not be accredited.
Also, different accrediting bodies have different standards and mean different things- one form of accreditation might simply mean "This department has a full set of course catalog descriptions and all the polices and procedures we expect an academic department to have" while another form of accreditation might mean "This department provides an outstanding education and future employers will value the degree".
My feeling is this:
- Do a Lot of Looking
A two or four year degree program is a huge investment of time and thousands of dollars. Most people wouldn't buy a car on a whim, would they? The most important thing you can do is to look at enough different programs that you develop a feeling for which programs are serious and which are not.
- Institutional Reputation and Word of Mouth
Some schools are known to be good schools. If a reputable 4-year university is offering an online program then they have a strong incentive to make sure their online program is also reputable, or else the university's reputation will suffer. Also, you might know (or find someone) who has gone to a particular school. Ask them what their experience is. They can tell you details like how engaged they felt and whether employers seemed to care about their degree.
- Look up Rankings
Many of the organizations that performed traditional college rankings are now starting to rank online and distance learning programs. As above, these organizations have an incentive to provide high quality information or else their reputation will suffer. Reputable rankings organizations will provide their methodology, which is the process they use to determine the rankings.
College rankings are never perfect. That's why it's important to read the methodology that a ranker uses. Does the ranking reflect values that are important to you? Is the ranking based on student surveys, on empirical data like faculty to student ratio, or a combination of both?
I won't recommend a specific rankings set, especially for online programs because I have zero experience here. The US News and World Report is one organization well known for ranking brick and mortar institutions, and they are now branching out into online degree programs.
- Contact the Programs You're Interested In
Reputable schools will usually provide you with data on student outcomes. Ask for alumni references. Ask for accrediting bodies and then follow up on those organizations and see who else they have accredited.
Some financial metrics can indicate that a degree program might not be all that great. You can look up student loan default rates for a school, which might indicate that alumni are not able to well-paying jobs. You might also be able to find the ratio of federally-backed student loans to private non-federal loans. The amount of private lending in the student loan market has grown significantly in the last 20 years though, so I don't know how useful this would be.