During the summer months or hot, humid weather (which could mean all year round for some), please remember to keep your bento as cool as possible, especially if it is going to be left out for several hours.
I find small, gel-filled ice packs work well. They are plastic packs filled with a gel that can be frozen and re-frozen. If you have a small container filled with salad, you can put a small ice-pack directly on top of the salad before closing the container. If you are worried about leakage, put the ice pack into a small ziplock bag first. (For HK residents, you can buy these gel packs from the Jusco $10 store.)
You can also pack the ice packs together with your bento in a cloth bag or insulated bag.
In order to stop bacteria growing quickly in the first place, make sure you heat up the food/leftovers well before packing them into the bento.