This article is from the Toyota Tundra FAQ, by Steve Yee with numerous contributions by others.
This is a known problem involving either the front and/or rear door latches.
They need to be readjusted or replaced. In some cases, the composite plastic
latches may need to be replaced by a metal/composite latch.
In some other cases, the rear doors have been shut improperly or there may be
something jammed between the door and the cab. This has reported to cause
similar symptoms of the doors unlocking, and the interior lights turning
on/headlamps shutting off.
 
Continue to: