Bicycle locks and chains prevent opportunity theft of your bicycle. You can never fully secure a bicycle as it can be easily disassembled with tools. They do however slow the theft, and can stop the prevent the theft of the entire bike. Take into account how often you use the lock, the weight, and where you lock the bike when choosing your bicycle lock. D-locks are typically safer, but require specific bike parking where as a chain is more versatile.