My on campus flat was in a tower block of flats, with a security door to access the flat block, then our flat door with another lock on it (both fob locks, so no keys), then each of our en-suite bedrooms had heavy locks on them.
I'd lock my bedroom door if I was- going out, going to lectures, going home for the weekend, in the shower/loo, sleeping and sometimes if I was studying in my room.
I wouldn't lock it if I was down the corridor in the kitchen, as my flatmates were trustworthy, and nobody could get into the flat without you hearing the intercom buzz or the flat door open as it was a noisy door.
My flatmates were less conscious about locking their doors then I was and would often even prop them open (which was against the Uni regulations as they were fire doors, but nobody really cared). One of my flatmates even went home for a week and left her door unlocked and all her stuff inside.
Nothing ever happened though, but I'd say that was just luck.
My advise would be to always lock your door - carry your keys on a lanyard or something. Much safer.