If you were using active voice, it would be better to say
The box used to contain toys.
However, you're asking about passive voice. In passive voice, the subject (the do-er) trades places with the object. "A car hit me" (active) vs. "I was hit by a car" (passive).
If we start with the basic past-tense sentence above and make it passive, we get:
Toys used to be contained by the box.
or
Toys used to be contained in the box.
An alternative would be the passive past perfect (past perfect since the box is now empty):
Toys had been contained by/in the box.
Passive voice has its uses, but in this case, I'd suggest going with the active voice. Both "Toys used to be contained by/in the box" and "Toys had been contained by/in the box" are rather awkward sentences.