It’s fairly well understood that setting up your sag appropriately is the first and most important step towards suspension performing as you want it to.
Sag tells you how stiff your spring is, proportional to the load (ie your weight) it has to bear.
In this regard, it's one of the best tools we have for suspension setup, because it is dimensionless (it's a ratio), which, for example, gives us some idea of how hard of a hit you'd have to take in order to bottom your suspension. This certainly isn't the only consideration, but it's the easiest one to quantify.
For example, a completely linear spring curve at 25% sag tells us that your body weight compresses it 1/4 of its full distance, so it'd take a force of about 4 times your body weight to bottom the suspension (this corresponds with a vertical acceleration of about 4g's). At 33% (ie 1/3) sag on the same system, it'll only take you 3 times your body weight to fully compress the suspension... in theory. So from this, we can deduce that you'll need to be quite a bit stronger and probably more aggressive in order to withstand 4 times your own body weight, than you would be to withstand 3 times your body weight. Sounds great, because in theory that knowledge could be applied to different riders on different bikes. And as a starting point, it's better than nothing.
Above is shown two spring curves, where we can see that the sag force at 30% means that the blue curve is generating 80% of the force of the red curve there, and also 80% of the bottom out force of the red curve. All else being equal, the red curve would give a 100kg rider/bike combination the same spring characteristic as the blue curve gives to an 80kg rider/bike combination.
The difficulties with sag lie in the nuances however. Very few people actually know how much spring force they want or need at bottom out. Furthermore, very few systems (fork, shock or frame) are actually linear, meaning that unless you're a massive nerd, you don’t actually know exactly what your spring can generate at bottom out anyway. So in that respect, this isn't hugely useful, although most frame manufacturers can give you a good idea of what sag percentage their frames typically work best at.
Where it gets harder is with forks. Friction and the fact that the fork isn't actually vertical mean that even measuring fork sag is little more than stabbing in the dark. A better bet is to start with manufacturers' recommended air or coil spring settings for your weight - Fox and Rockshox print these on the back of the fork lowers to make life easy.
But what if you follow the frame, fork and shock manufacturers' sag recommendations, yet things still aren't right? An inappropriate spring rate can mean you're constantly bottoming out, never able to use full travel, riding too low, suffering unnecessary harshness, getting kicked off jumps, unable to get the bike off the ground easily and many other negative characteristics.
At that point, it's time to forget your sag, and work on getting your spring rate (air pressure or coil spring rate) right based solely on ride quality. If it feels better, it’s better. If it feels worse, it’s worse.