The optimization of renewable energy power plants (REPPs) to provide electricity and hydrogen for charging Electric Vehicles (EVs) and Fuel Cells Vehicles (FCVs) permits to achieve the sustainability goals in the near future. Indeed, REEPs, EVs, and FCVs have zero greenhouses gas emission. The optimization of the REPPs according to renewable energy sources potential and load requirements, results in costs minimization and increase in the REPPs efficiency. In this context, this paper presents the optimization and the analysis of four standalone REPPs providing electricity required for charging EVS and producing green hydrogen for charging FCVs. The analyzed REPPs consist of wind turbines, photovoltaic panels, power converters, fuel cell, electrolyzers, and hydrogen tanks. The obtained results of each technical solution are analyzed apart and compared with other results to identify the system having the lowest Net Present Cost (NPC), and the lowest levelized electricity and hydrogen costs. The renewable energy potential shows a wind average speed, and average solar radiation of 5 m/s and 6 kWh/m2/day, respectively. The optimization results show that the PV-battery system has a lowest NPC of 11 M€. The PV-wind fuel cell system has the highest NPC due to the high price of wind turbines and fuel cells. The minimum and maximum levelized cost of hydrogen are 4.78 €/kg and 5.55 €/kg, respectively. The optimized configuration produces around 11,756,589 kWh/year of electricity and 177,607 kg of green hydrogen. The total required capacity is 6 MWp PV system with 1800 kWh of battery for the storage of electricity.