As real-time data sources expand, the need for detecting anomalies in streaming data becomes increasingly critical for cutting edge data-driven applications. Real-time anomaly detection faces various challenges, requiring automated systems that adapt continuously to evolving data patterns due to the impracticality of human intervention. This study focuses on energy systems (ES), critical infrastructures vulnerable to disruptions from natural disasters, cyber attacks, equipment failures, or human errors, leading to power outages, financial losses, and risks to other sectors. Early anomaly detection ensures energy supply continuity, minimizing disruption impacts, an enhancing system resilience against cyber threats. A systematic literature review (SLR) is conducted to answer 5 essential research questions in anomaly detection due to the lack of standardized knowledge and the rapid evolution of emerging technologies replacing conventional methods. A detailed review of selected literature, extracting insights and synthesizing results has been conducted in order to explore anomaly types that can be detected using Machine Learning algorithms in the scope of Energy Systems, the factors influencing this detection success, the deployment algorithms and security measurement to take in to consideration. This paper provides a comprehensive review and listing of advanced machine learning models, methods to enhance detection performance, methodologies, tools, and enabling technologies for real-time implementation. Furthermore, the study outlines future research directions to improve anomaly detection in smart energy systems.