The depletion of fossil fuels and growing environmental concerns have propelled the need for renewable energy sources. Micro-grids (MGs) have emerged as a viable solution for utilizing these resources effectively. This paper addresses the unit sizing problem for a two MG system using an intelligent method that considers air pollution emissions while catering to electrical and thermal loads. The MG incorporates photovoltaic (PV) panels, wind turbines (WTs), and a storage energy system comprising an electrolyzer, hydrogen tank, and fuel cell (FC) for combined heat and power (CHP) generation. In cases of excess power generation, an electric heater and backup boiler are employed to meet thermal loads. To account for air pollutant emissions, it is considered as a cost constraint in the objective function. Reliability is ensured by incorporating load curtailment costs as a limiting constraint. The MG is simulated in both islanding and grid-connected modes, with a generation planning program considering load growth. The IEEE RTS data is used for a peak 500 kW electrical load, and seasonal climate changes are factored in when deriving the thermal load. The modified particle swarm optimization (MPSO) algorithm is employed to find the global optimal solution. This research addresses key motivations, problems, and solutions in the field of renewable energy-based MGs. It introduces hydrogen tanks and batteries as storage systems to enhance system reliability. The integration of complementary energy sources, such as wind and solar, is proposed to improve system reliability and affordability. The use of batteries, solar, wind, and boilers for electrical and thermal load provision is more economically viable than hydrogen storage due to fuel prices. The proposed model significantly reduces pollution, enhances efficiency, decreases MG costs, and reduces dependence on fossil fuels. Integration with the grid reduces boiler usage, minimizes additional wasted power, generates income from power sales, and further reduces costs. Optimal size determination reveals the affordability challenges of wind and solar sources compared to microturbines, necessitating government intervention through subsidies or penalties for polluting resources. The results demonstrate that increasing subsidies expands the use of wind and solar resources, while the growth of fuel prices impacts resource size and necessitates storage use. Fine-tuning the penalty factor reduces pollution, but exceeding the limit reduces the adoption of renewables. Lastly, interest rate increases influence resource installations in different stages of the development plan. The outcomes of this study highlight the feasibility and effectiveness of the proposed model in addressing the challenges of MG design, operation, and integration of renewable energy sources. The findings contribute to the advancement of sustainable energy systems and provide valuable insights for policymakers and researchers in the field.