I rarely lock up my whole backpack but almost always lock my passport, backup credit card, and any other valuables. Yeah, lockers do vary so I tend to carry two sizes: a standard school-locker type and a smaller option. I tend to use the smaller one more frequently as it can also be used to lock the zipper on my backpack during bus journeys or in the absence of a locker.
As others have said though, the lock is really just a deterrent and won't stop anyone who is really determined to get into your stuff, but it's about the least you can do regarding security so it's worth it. Typically hostel thefts are crimes of opportunity and most would-be thieves are just going to look for an easy target.
I used a mini-safe for the smaller valuables and a trunk with a combination lock for the bigger valuables. The trunk stayed under my bed.