Start at the shock manufacturer's recommendations. Only change one setting at a time, and don't change damping more than 2 clicks at a time. For compression damping, increase until expansion joints or sharp bumps are jarring, then back off one click. Don't forget that when you increase preload, you have to increase rebound damping and vice versa for decreasing preload. Too little rebound damping.
Rear end takes first bump in a series but is harsh on later bumps.
Damping is gone because of low nitrogen pressure, tired oil, or damaged internal components.