This paper examines the development of community microgrids (CMGs) as a strategy to bridge the gap in energy equity in underserved communities that have long faced energy and environmental injustices. By introducing three novel equity-oriented indices-the Community Energy Financial Index (CEFI), the Community Energy Resiliency Index (CERI), and the Community Energy Sustainability Index (CESI), we aim to provide a framework to evaluate energy-related inequalities and challenges within communities. The proposed framework quantifies how the deployment of CMGs can systematically address obstacles that community members face in accessing clean and reliable energy affordably. We then propose a two-stage stochastic mixed-integer programming model, utilizing Benders decomposition, to optimize the planning and operation of CMGs in a community context in the face of operational uncertainties. Through a case study based on three energy-poverty neighborhoods in the Greater Houston area, our findings reveal, for the first time, that significant improvements in energy equity-related metrics-such as affordability, cost-effectiveness, resilience, and sustainability-can be achieved for community members through targeted investment and strategic planning of CMGs. Furthermore, our comprehensive analysis shows that under various budget scenarios and technology selections, CMGs planned with equity in mind consistently outperform the business-as-usual case and the conventional approach which focuses solely on cost minimization, underscoring the potential of CMGs to foster equitable, resilient, and sustainable energy systems for the future.