Energy management in electrical networks is an important issue that is considered by many in recent studies. This problem becomes more important due to the proliferation and development of renewable generators and their uncertain behavior. Global warming, environmental and economic issues are the main reasons of using renewable resources in electrical networks. Moreover, by increasing the penetration of renewable resources, the surplus power generation problem is appeared in the electrical networks. In this paper, the effect of renewable resources penetration and surplus power generation issues have been investigated. Therefore, a microgrid with high penetration of renewable resources has been utilized in this study with the aim of achieving efficient energy management. In order to overcome the mentioned problems, this paper investigates the advantages and defects of three main strategies which include storing the surplus power by electrical storage, converting the extra power to the hydrogen as a powerful energy carrier and transferring the surplus power to the main grid. Afterward, a comprehensive solution has been presented to resolve the renewable resources penetration and defects of the mentioned strategies. It is worth mentioning that the energy management is presented for future 24-hour in which the cost and pollution objective functions are minimized simultaneously. Furthermore, the effects of load, wind speed and solar radiation uncertainties are investigated in the proposed planning. Finally, a sensitivity analysis is presented to reveal the effect of parameters variations on the objective functions. The final results show that with optimizing the energy storage, the cost and pollution are reduced from 3842.981 $ and 75.88 kg to 2888.33 $ and zero kg. As well, by optimizing the tie line capacity and utilizing the power to gas system a revenue about 1720 $ and 210.735 $ are obtained, respectively. Nevertheless, the pollution problem has still remained. In r