Rural communities usually settle in territories where crop self-consumption is the main source of sustenance. In this context, climate change has made these environments of crop control susceptible to water shortages, impacting crop yields. The implementation of greenhouses has been proposed to address these problems, together with strategies to optimize water and energy consumption. In this study, an energy–water management system based on a model predictive control strategy is proposed. This control strategy consists of a fuzzy optimizer used to determine the optimal consumption from isolated microgrids considering the local resources available. The proposed controller is implemented on two timescales. First, medium-term optimization over one month is used to estimate the necessary water demand required to support crop growth and a high yield. Second, short-term optimization is used to determine the optimal climate conditions inside the greenhouse for managing crop irrigation, refilling the reserve water tank, and providing ventilation. Experiments were conducted to test this approach using a case study of an isolated community. For such a case, energy consumption was reduced, and the irrigation process was optimized. The results indicated that the proposed controller is a viable alternative for implementing intelligent management systems for greenhouses.