Cliff's non-solo tone came primarily from cranking amps and using an Ibanez Tube Screamer (probably to drive the amps harder). He used Mesa gear, with "custom" 15-inch-speaker and 4x12 cabs. In addition, between Ride the Lightning and Master of Puppets he was using different basses, which resulted in radically different tones (Kill 'Em All is unique too, but you asked about Lightning and Puppets).
On Ride the Lightning, he was using his modified Rickenbacker 4001. To be specific about the mods, he had a Gibson EB-0 pickup installed in place of the neck pickup, a DiMarzio Jazz-style pickup in place of the bridge pickup, AND a hot strat pickup by Seymour Duncan under the bridge in place of the adjustable mutes. This leads to a very raucous, hot-rodded tone, with distorted highs and a thunderous bottom end that serves very well.
On Master of Puppets he was using his Aria SB Black n Gold (probably; that was apparently his favorite). This is a much simpler bass, with a single humbucker pickup right about where a P-bass pickup is. He changed that pickup out too, but I don't think the change was as drastic, nor do I know what the pickup was. Anyway, that went through the same cranked setup, and got a much more rumbly, P-esque sound.
On both of these, to the best of my knowledge he was using extremely light-gauge Rotosound Swingbass strings, which allowed those crazy bends he did during his solos. He may have also used Funkmasters, but I don't know that for certain.