The reliability of the power grid is a constant problem faced by those who operate, plan and study power systems. An alternative approach to this problem, and others related to the integration of renewable energy sources, is the microgrid. This research seeks to quantify the potential benefits of urban community microgrids, based on the development of planning models with deterministic and stochastic optimization approaches. The models ensure that supply meets demand whilst assuring the minimum cost of investment and operation. To verify their effectiveness, the planning of hundreds of microgrids was set in the city of Santiago de Chile. The most important results highlight the value of community association, such as: a reduction in investment cost of up to 35%, when community microgrids are planned with a desired level of reliability, compared to single residential household microgrids. This reduction is due to the diversity of energy consumption, which can represent around 20%, on average, of cost reduction, and to the Economies of Scale (EoS) present in the aggregation microgrid asset capacity, which can represent close to 15% of the additional reduction in investment costs. The stochastic planning approach also ensures that a community can prepare for different fault scenarios in the power grid. Furthermore, it was found that for approximately 90% of the planned microgrids with reliability requirements, the deterministic solution for the worst three fault scenarios is equivalent to the solution of the stochastic planning problem.