The simple rule: if a single carabiner failure would cause an injury, use a locker. If the system has redundancy or the load is non-critical, a non-locking biner is faster and lighter.
A typical climbing rack carries both. Two or three lockers for belay, anchor, and personal anchor work — twelve to twenty non-lockers for quickdraws and gear racking. This page covers when to use each, the trade-offs, and the four common locking mechanisms.