The use of rotations is an effective strategy to control crop diseases and improve plant health. The soil bacterial communities in the rhizosphere are highly important for maintaining soil productivity. However, the composition and structure of soil bacterial communities in the rotations of vegetable crops remain unclear. In this study, we explored the bacterial diversity and community structure of the tomato rhizosphere, including enzyme activities, yield, and fruit quality, under three different cropping systems: tomato-tomato (Solanum lycopersicum) continuous cropping (TY1), eggplant (Solanum melongena)-tomato rotation (TY2) and arrowhead (Sagittaria trifolia)-tomato rotation (TY3). The composition and diversity of the rhizosphere bacterial communities differed significantly. The diversity was more in the TY2 and TY3 treatments than those in the TY1 treatment. Chujaibacter and Rhodanobacter were two predominant and unique strains detected only in TY1, while the relative abundances of Curvibacter and Luteimonas were the highest in TY2 and TY3, respectively. Moreover, Lysobacter was a relatively abundant type of biocontrol bacterium found only in the TY3 treatment, which could contribute to alleviating the obstacle of tomato continuous cropping. Compared with the TY1 treatment, the activities of catalase were significantly higher in the TY2 and TY3 treatments. In addition, compared with TY1, the TY2 and TY3 plots increased the following parameters: tomato yields by 24–46%, total soluble solids by 37-93%, total organic acid by 10-15.7% and soluble protein by 10-21%, while the content of nitrate was significantly reduced by 23%. Altogether, compared with the tomato monoculture, the rotations of tomato with eggplant and arrowhead shifted the rhizosphere bacterial communities and improved the yield and quality of the tomato. Moreover, a tomato rotation, particularly with arrowhead, was an effective way to alleviate the obstacles of continuous cropping.