In this paper, a stochastic techno-economic optimization framework is proposed for three different hybrid energy systems that encompass photovoltaic (PV), wind turbine (WT), and hydrokinetic (HKT) energy sources, battery storage, combined heat and power generation, and thermal energy storage (Case I: PV–BA–CHP–TES, Case II: WT–BA–CHP–TES, and Case III: HKT–BA–CHP–TES), with the inclusion of electric and thermal storage using the 2m + 1 point estimate method (2m + 1 PEM) utilizing real data obtained from the city of Espoo, Finland. The objective function is defined as planning cost minimization. A new meta-heuristic optimization algorithm named improved fire hawk optimization (IFHO) based on the golden sine strategy is applied to find the optimal decision variables. The framework aims to determine the best configuration of the hybrid system, focusing on achieving the optimal size for resources and storage units to ensure efficient electricity and heat supply simultaneously with the lowest planning cost in different cases. Also, the impacts of the stochastic model incorporating the generation and load uncertainties using the 2m + 1 PEM are evaluated for different case results compared with the deterministic model without uncertainty. The results demonstrated that Case III obtained the best system configuration with the lowest planning cost in deterministic and stochastic models and. This case is capable of simply meeting the electrical and thermal load with the contribution of the energy resources, as well as the CHP and TESs. Also, the IFHO superiority is proved compared with the conventional FHO, and particle swarm optimization (PSO) achieves the lowest planning cost in all cases. Moreover, incorporating the stochastic optimization model, the planning costs of cases I–III are increased by 4.28%, 3.75%, and 3.57%, respectively, compared with the deterministic model. Therefore, the stochastic model is a reliable model due to its incorporating the existence of uncertainties in comparison with the deterministic model, which is based on uncertain data.