Smart-grid optimization increasingly uses artificial intelligence, automated control, and data-driven market coordination to manage low-carbon electricity systems. These developments create new opportunities for flexibility, but they also raise unresolved questions about equity, accountability, and justice. Existing reviews often examine energy justice, smart-grid optimization, algorithmic governance, and flexibility markets as separate domains. This fragmentation limits understanding of how optimization models and market rules may reproduce or reduce social inequalities. This article critically reviews the literature on justice-aware smart-grid optimization and develops a structured future research agenda. It focuses on how energy equity, algorithmic governance, and low-carbon flexibility markets can be integrated into future smart-grid research and policy. A targeted review of 26 peer-reviewed articles published between 2017 and 2025 integrates perspectives from energy justice, smart-grid studies, AI governance, and electricity market design. The review identifies conceptual tensions, methodological gaps, and governance challenges rather than presenting new empirical data. The review shows that justice is often operationalized narrowly in optimization, while broader concerns about recognition, participation, and accountability remain underdeveloped. It also finds that flexibility markets can distribute benefits unevenly unless market design explicitly addresses barriers to access and agency. A more interdisciplinary and justice-centered approach is needed to guide smart-grid optimization. The proposed agenda calls for stronger integration between technical modeling, energy justice theory, participatory governance, and regulatory innovation.