A banana has one of the highest ethylene levels among fruits, so storing it with tomatoes can trigger ethylene formation in tomatoes and accelerate their ripening.
You should store them in a breathable container, as it traps the ethylene gas without creating a stagnant environment in which the food will go anaerobic.
For faster ripening, the ideal storage temperature is 85 F, while the lowest possible is 55 F. Avoid freezing, as ice crystals can rupture a tomato's soft cells while thawing.
However, young tomatoes with immature seeds don't ripen in response to ethylene. For the hack to work, tomatoes must have matured enough on the vine to undergo a DNA revamp.