Renewable energy solutions play a crucial role in addressing the growing energy demands while mitigating environmental concerns. This study examines the techno-economic viability and sensitivity of utilizing solar photovoltaic/polymer electrolyte membrane (PEM) fuel cells (FCs) to meet specific power demands in NEOM, Saudi Arabia. The novelty of this study lies in its innovative approach to analyzing and optimizing PV/PEMFC systems, aiming to highlight their economic feasibility and promote sustainable development in the region. The analysis focuses on determining the optimal size of the PV/PEMFC system based on two critical criteria: minimum cost of energy (COE) and minimum net present cost (NPC). The study considers PEMFCs with power ratings of 30 kW, 40 kW, and 50 kW, along with four PV panel options: Jinko Solar, Powerwave, Tindo Karra, and Trina Solar. The outcomes show that the 30 kW PEMFC and the 201 kW Trina Solar TSM-430NEG9R.28 are the most favorable choices for the case study. Under these optimal conditions, the study reveals the lowest values for NPC at USD 703,194 and COE at USD 0.498 per kilowatt-hour. The levelized cost of hydrogen falls within the range of USD 15.9 to 23.4 per kilogram. Furthermore, replacing the 30 kW Trina solar panel with a 50 kW Tindo PV module results in a cost reduction of 32%. The findings emphasize the criticality of choosing optimal system configurations to attain favorable economic outcomes, thereby facilitating the adoption and utilization of renewable energy sources in the region. In conclusion, this study stands out for its pioneering and thorough analysis and optimization of PV/PEMFC systems, providing valuable insights for sustainable energy planning in NEOM, Saudi Arabia.