Tomato, as one of the most important vegetable crops in China, faces widespread issues of improper irrigation and fertilization practices during production, which severely affect both yield and fruit quality. In this experiment, to explore the usage of water and fertilizer rules which improve tomato quality, the variety of 181 was used as the test material. Different levels of water and fertilizer treatments were set, with sufficient water and fertilizer as the control (CK), where irrigation was 87.32 L per plot for once and fertilization consisted of N 420 kg·hm-2, P2O5 180 kg·hm-2, K2O 468.0 kg·hm-2. Three irrigation levels were set: W1 (74.15 L per plot for once), W2 (65.42 L per plot for once), W3 (56.70 L per plot for once), and three fertilization levels: F1 (100% fertilizer amount of CK), F2 (85% fertilizer amount of CK), F3 (70% fertilizer amount of CK). These were combined into nine treatments: W1F1, W1F2, W1F3, W2F1, W2F2, W2F3, W3F1, W3F2, and W3F3. The results showed that plant height, stem diameter, and leaf area of tomato plants significantly increased under the W2F2 treatment compared with CK. The soluble solids content under W2F2, W2F3, and W3F3 treatments increased by 1.6, 1.1, and 0.9 percentage points, respectively, compared with CK. The soluble sugar content under W2F2 treatment increased by 2.0 percentage points compared with CK, and the sugar-acid ratio was the highest under W2F2 treatment, significantly different from other treatments and 100.06% higher than CK. Additionally, the nitrate content was the lowest under W3F3 treatment, while the single fruit weight was the highest under W2F2, with no significant difference from CK, and the average number of fruits per plant and yield were significantly higher than those of other treatments. Based on all indicators, the W2F2 treatment, i.e., irrigation of 65.42 L per plot for once and 85% fertilization (N 357 kg·hm-2, P2O5 153 kg·hm-2, K2O 397.8 kg·hm-2), effectively improved both the quality and yield of tomatoes grown under greenhouse conditions while achieving water and fertilizer savings. Thus, it can be considered an optimal water-fertilizer coupling strategy for high-quality tomato cultivation in substrate-based greenhouse production.