This review examines the impact of data analytics powered by the Internet of Things (IoT), edge computing, and artificial intelligence (AI) on improving energy efficiency in smart environments, with a focus on smart factories, smart cities, and smart territories. Capital expenditure of just five technology companies is now larger than global investment in oil and natural gas production. Many jurisdictions are seeing project pipelines accelerate dramatically, although not all projects will come to fruition. Advanced AI, machine learning (ML). Billions are lost every year to downtime, inefficiency, and waste. The answer lies in energy data analytics. Powered by AI, machine learning, and IoT, it enables utilities to predict failures before they happen, optimize consumption, and meet sustainability targets. On the other, AI applications can be deployed to save energy, increase competitiveness, mitigate externalities, improve nergy security. Energy Internet goes beyond smart grid by integrating multiple energy systems, combining cyber-physical-social systems, and creating innovative business modes for the whole energy system. Widely installed sensors enable the collection of various monitoring data of the energy system, which can help.