This article reviews optimization techniques for microgrids, highlighting their importance for future electricity networks and the incorporation of renewable energy sources. It summarizes the system structure of microgrids, discusses various optimization algorithms used, including genetic algorithms and simulated annealing, and identifies future research challenges in microgrid optimization. The findings indicate a need for advanced methods such as AI and machine learning to address the increasing complexity of microgrid systems.