This research investigated the impacts of model prediction on the optimization of hybrid energy systems using a system consisting of solar panels, batteries, a proton exchange membrane fuel cell (PEMFC), and a chemical hydrogen generation system. A PEMFC has several advantages, such as low operating temperatures, fast response times, high power density, and environmental friendliness, and it can convert hydrogen into electricity. However, because hydrogen costs are an important consideration, the PEMFC is usually integrated with hybrid energy systems to guarantee system sustainability. Therefore, in this study, a whole-year household load and solar radiation data were applied to optimize the system components and power management, thereby reducing the system cost by 42.43% and improving system sustainability by 7.05%. The system responses showed that some hydrogen consumption might be saved if the solar and load profiles could be foreseen. Two prediction models were developed that could accurately forecast the radiation and load profiles. Next, a second-year dataset was employed to verify the effectiveness of the model prediction. The results showed that the system cost was reduced by 40.20% without model prediction and by 44.06% with model prediction compared to the original system settings. Finally, experiments to illustrate the feasibility of the hybrid energy system were conducted using prediction models. Based on the results, the model prediction was deemed effective in improving the performance of hybrid energy systems.