The Transportation Security Authority recommends travelers not lock their bags on the chance that they will be inspected. Of course, this increases the risk of theft. You could buy a specially TSA-approved lock or you could take the advice of an ingenious reader over at LifeHacker:
I use key rings to lock the zip of my check-in baggage and also to secure my carry on baggage. Advantage of using key ring is that it can be opened without a key! But at the same time it takes a small amount of time to get the ring out, this small amount of time is good enough to discourage anyone with malicious intent to try open the bag.
Hat tip: Donnie Hall