The tendency towards more and more employing renewable energies, particularly at the distribution system level and the residential sector has significantly increased. The growing penetration level of distributed generation (DG) units based on renewable energies has brought several challenges into power system operation and management. Thus, developing and proposing efficient energy management systems is regarded as a critical task in the area of power system operation. This issue is more highlighted in microgrids (MGs), that are mainly based on DG units. Accordingly, a day-ahead energy management system is proposed, which is operating in the grid-connected mode and equipped with a photovoltaic (PV) panel, a wind turbine (WT), and a microturbine (MT), besides the energy storage system. A detailed mathematical model was used for the PV panel and different weather circumstances and their impacts on the solar power generation and MG day-ahead resource scheduling problem are investigated. Afterward, a hybrid optimization algorithm, obtained by combining the crow search algorithm and pattern search method, known as (HCS-PS) has been proposed to deal with the problem for a 24-h scheduling period. The results, obtained from simulation show that the suggested HCS-PS method is capable of resulting in more superior solutions compared to some other well-established optimization algorithms. Moreover, the uncertainties of the problem due to the intermittent renewable power generation, load demand, and market price, have been successfully handled by deploying a scenario-based stochastic optimization technique.