The trend towards decentralized energy systems with an emphasis on renewable energy sources (RES) causes increased fluctuations and non-negligible weather-related uncertainties on the future supply side. Stochastic modeling techniques enable an adequate consideration of uncertainties in the investment and operation planning process of decentralized energy systems. The challenge is that modeling of real energy systems ends up in large-scale problems, already as deterministic program. In order to keep the stochastic problem feasible, we present a module-based, parallel computing approach using decomposing techniques and a hill-climbing algorithm in combination with high-performance computing (HPC) for a two-stage stochastic optimization problem. Consistent ensembles of the required input data are simulated by a Markov process and transformed into sets of energy demand and supply profiles. The approach is demonstrated for a residential quarter using photovoltaic (PV) systems in combination with heat pumps and storages. Depending on the installed technologies, the quarter is modeled either as stochastic linear program (SLP) or stochastic mixed-integer linear program (SMILP). Our results show that thermal storages in such a decentralized energy system prove beneficial and that they are more profitable for domestic hot water than for space heating. Moreover, the storage capacity for space heating is generally larger when uncertainties are considered in comparison to the deterministic optimization, i.e. stochastic optimization can help to avoid bad layout decisions.