The simple rule is that if a cutting board has obvious damage to the surface, it's probably unsafe to continue using it.
The most common such damage is scratches or grooves worn in by your knives, or actual cracks in the material, but any kind of narrow damage is bad; it's hard to effectively clean and can indeed harbor bacteria. The exception is wider wear, like a shallow but smooth worn-down area, which you can still clean. It's easy to tell the difference: if you can't clean it, it'll stay discolored in the grooves, making them very visible. A very worn cutting board will have so many scratches that they start to blend together, turning into a slightly rough, discolored region.
If it's a wooden cutting board and you're well-equipped, you may not have to replace it, though. You can sand it down to remove the damage, rather than discarding it. This depends on the wood; in some cases you may have trouble getting as good a finish as it originally had. While you can do it completely by hand, it's easiest to keep it flat with planer (or at least a belt or disc sander). See for example this What's Cooking America article or this workshop's article.
(None of the safety information is directly taken from a single source; the obvious one is the USDA article on cutting board and food safety that Jeff's answer replicates, but you can find the same advice virtually anywhere that discusses cutting board food safety, like this Consumer Search article - it's all common knowledge at this point.)