AI-Powered Energy Strategies: Enhancing Efficiency and Resilience