Lockers only appear on encounters with critters. Also the rewards you can find on them are related to the power of the critters you find, if i'm not mistaken. For example, you can find better items on super mutant encounters than in rats encounters.