Lighter bike = better handling offroad. This is always true.
On road incl good gravel - If you ride like the majority of DS riders that are happy to cruise along bike weight is less of an issue. However if you're closer to the fast/hooligan side of the spectrum lighter will generally be better.
Back to offroad/twintrack/rough roads = again lighter is always better. Reality is no bike 800cc+> is light. From there on up they're all heavy. Light bikes are <160kg wet weight in DS terms.
The 500cc road legal enduro bikes are again in a class of their own here being likely 130kg or less wet and loaded.
Why does bike weight matter vs what you weigh? It influences your ability to control and throw your bike around vs just hanging on for the ride. In the light of this 5kg makes very little difference but 20kg or more makes a huuuuuge difference. Don't believe me? Bring your 800cc+ bike and we can go for a ride, rough but ok gravel and some twin track, lets say Matjiesrivier - Eselbank - Wupperthal or in fact even just the Highlands road to kleinmond. If you're an average rider like myself your 800cc bike just won't keep up because you will be fighting the bikes weight, I'll be controlling mine

(
disclaimer - if you're a Chris Birch protege then my argument is invalid 
)