With the rapid integration of renewable energy sources, distributed generation and intelligent loads, the complexity of modern energy systems has made power quality management a critical challenge, especially in microgrids. Changes in voltage, frequency, harmonics, and load factors can decrease system reliability, efficiency and performance of sensitive electrical equipment. To overcome these challenges, this research work suggests a machine learning (ML) based approach to power quality assessment of microgrid energy systems. The proposed methodology relies on data-driven algorithms that use electrical parameters measured in the microgrid to classify the power quality disturbances, predict the system's potential operating conditions, and assist in making real-time control decisions. Patterns are detected using advanced ML models to improve the accuracy and quickness of disturbance diagnosis for voltage sags, voltage swells, harmonics and transient events. The proposed approach is expected to incorporate AI/ML for power quality monitoring can boost the precision of disturbance detection, cut down reaction time, refine voltage management and frequency control, and aid in the more effective incorporation of renewable energy resources. Additionally, intelligent prediction helps to optimize energy management, boost operational reliability, and improve resilience in all weather conditions and load scenarios. The proposed AI and ML framework holds greater potential for enhancing power quality and operational efficiency in microgrid-based energy systems, offering a scalable and sustainable solution for the future of smart grids that will be more reliable, efficient, and flexible.