This paper presents a study on the technical, economic, and environmental aspects of renewable energy resources-based distributed generation units (DGs). These units are connected to the medium-voltage network to create a new structure called a microgrid (MG). Renewable energies, especially wind and solar, are the most important generation units among DGs. The stochastic behavior of renewable resources increases the need to find the optimum operation of the MG. The optimal operation of a typical MG aims to simultaneously minimize the operational costs and the accompanied emission pollutants over a daily scheduling horizon. Several renewable DGs are investigated in the MG, consisting of biomass generators (BGs), wind turbines (WTs), and photovoltaics (PV). For the proposed operating strategy of the MG, a recent equilibrium optimization (EO) technique is developed and is inspired by the mass balance models for a control volume that are used to estimate their dynamic and equilibrium states. The uncertainties of wind speed and solar irradiation are considered via the Weibull and Beta-probability density functions (PDF) with different states of mean and standard deviation for each hour, respectively. Based on the developed EO, the hourly output powers of the PV, WT, and BGs are optimized, as are the associated power factors of the BGs. The proposed MG operating strategy based on the developed EO is tested on the IEEE 33-bus system and the practical large-scale 141-bus system of AES-Venezuela in the metropolitan area of Caracas. The simulation results demonstrate the significant benefits of the optimal operation of a typical MG using the developed EO by minimizing the operational costs and emissions while preserving the penetration level of the DGs by 60%. Additionally, the voltage profile of the MG operation for each hour is highly enhanced where the minimum voltage at each hour is corrected within the permissible limit of [0.95–1.05] Pu. Moreover, the active power losses per hour are greatly reduced.