Renewable energy technologies and resources, particularly solar photovoltaic systems, provide cost-effective and environmentally friendly solutions for meeting the demand for electricity. The design of such systems is a critical task, as it has a significant impact on the overall cost of the system. In this paper, a mixed-integer linear programming-based model is proposed for designing an integrated photovoltaic-hydrogen renewable energy system to minimize total life costs for one of Saudi Arabia’s most important fields, a greenhouse farm. The aim of the proposed system is to determine the number of photovoltaic (PV) modules, the amount of hydrogen accumulated over time, and the number of hydrogen tanks. In addition, binary decision variables are used to describe either-or decisions on hydrogen tank charging and discharging. To solve the developed model, an exact approach embedded in the general algebraic modeling System (GAMS) software was utilized. The model was validated using a farm consisting of 20 greenhouses, a worker-housing area, and a water desalination station with hourly energy demand. The findings revealed that 1094 PV panels and 1554 hydrogen storage tanks are required to meet the farm’s load demand. In addition, the results indicated that the annual energy cost is $228,234, with a levelized cost of energy (LCOE) of 0.12 $/kWh. On the other hand, the proposed model reduced the carbon dioxide emissions to 882 tons per year. These findings demonstrated the viability of integrating an electrolyzer, fuel cell, and hydrogen tank storage with a renewable energy system; nevertheless, the cost of energy produced remains high due to the high capital cost. Moreover, the findings indicated that hydrogen technology can be used as an energy storage solution when the production of renewable energy systems is variable, as well as in other applications, such as the industrial, residential, and transportation sectors. Furthermore, the results revealed the feasibility of employing renewable energy as a source of energy for agricultural operations.