This brief focuses on stochastic energy optimization for distributed energy resources in smart grids. Along with a review of drivers and recent developments towards distributed energy resources, this brief presents research challenges of integrating millions of distributed energy resources into the grid. The brief then proposes a novel three-level hierarchical architecture for effectively integrating distributed energy resources into smart grids...