When simulating the response of fruit growth and quality to environmental factors and cultivation practices, the interactions between the mother plant and fruit need to be considered as a whole system. Here, we developed the integrative Tomato plant and fruit Growth and Fruit Sugar metabolism (TGFS) model by coupling equations describing the biophysical processes of leaf gas exchange, water transport, carbon allocation, organ growth and fruit sugar metabolism. The model also accounts for effects of soil nitrogen and atmospheric CO2 concentration on gaseous exchange of water and carbon by the leaf. With different nitrogen and water input values, TGFS performed well at simulating the dry mass of the tomato leaf, stem, root, and fruit, and the concentrations of soluble sugar and starch in fruit. TGFS simulations showed that increasing air temperature and CO2 concentration has positive effects on fruit growth, but not on sugar concentrations. Further model-based analyses of cultivation scenarios suggest that, in the context of climate change, decreasing N by 15%-25% and decreasing irrigation by 10%-20% relative to current levels, would increase tomato fresh weight by 27.8%-36.4% while increasing soluble sugar concentration by up to 10%. TGFS provides a promising tool to optimize N and water inputs for sustainable high-quality tomatoes.