The increasing deployment of artificial intelligence (AI) in smart energy systems creates emerging legal challenges concerning algorithmic accountability, consumer protection, transparency, and energy justice. AI-assisted decisions affecting energy pricing, demand management, grid optimization, consumer profiling, and access to energy services may produce significant consequences for individuals while legal responsibility and effective remedies remain fragmented across regulatory regimes. This study examines how comparative legal frameworks govern AI-mediated decision-making in smart energy markets and identifies legal safeguards necessary to reconcile technological innovation with accountability and energy justice. Employing qualitative doctrinal legal research, the study analyzes legislation, regulatory instruments, institutional frameworks, and relevant legal materials through statutory, conceptual, and comparative approaches, focusing on the European Union, United Kingdom, United States, Australia, and Singapore. The findings reveal convergence around transparency, accountability, risk management, human oversight, and non-discrimination, but substantial differences in regulatory architecture, institutional responsibility, and enforceability. The analysis further identifies a persistent gap between general AI governance principles and sector-specific legal safeguards for energy applications, particularly regarding algorithmic explainability, consumer contestability, continuous regulatory supervision, allocation of responsibility, and access to effective remedies. To address this gap, the study develops a Digital Energy Justice Framework integrating four dimensions: algorithmic procedural safeguards, institutional accountability, energy-consumer protection, and rights-based remedies. The framework conceptualizes responsible AI governance as a legal process rather than merely a technological or ethical objective, linking algorithmic transparency and human oversight with distributive and procedural energy justice. The study contributes to comparative AI and energy law by providing a sector-specific legal framework for evaluating AI-mediated energy decisions and by identifying institutional and procedural safeguards capable of strengthening accountability, fairness, consumer protection, regulatory oversight, and effective redress in digitally transformed energy markets.