How can I secure a plastic toolbox to the wall?
If the tool box is not actually designed to be mounted to the wall then there is a strong possibility that doing so may deform the box so that it does not function in the way intended. This could be especially true if the box has a hinged lid. I think that your best bet would be to build a small shelf for under the tool box and secure that into the wall studs. You could then secure the box to the shelf possibly by even gluing it in place. Gluing the base of the box to the shelf would have far less chance of deforming the shape of the thing. Using a shelf idea also allows easier adjustment of where to place the box so that a possible lid does not interfere with the wall.