Solar energy is clean, eco-friendly, abundant, inexpensive, and sustainable, and using it as a source of electricity generation can significantly reduce environmental pollution. For residential houses located in isolated areas without access to the national electricity grid, photovoltaic-battery systems (PBSs) are good choices for electricity generation. This paper addresses the optimization of PBS sizing and energy managing for isolated off-grid standalone houses, considering uncertainties in solar irradiation. We propose a novel approach by formulating the problem as a two-stage stochastic programming model, enhanced with a k-means clustering algorithm for scenario generation. Additionally, we extend the model by incorporating worst-case (WC) and conditional-value-at-risk (CVaR) measures to enhance robustness against uncertainty. To address the variability in scenario occurrence probabilities, we develop a distributionally robust optimization (DRO) model, further contributing to the system reliability. Computational experiments on real-world datasets reveal that our modeling frameworks outperform existing stochastic optimization models in terms of computational efficiency. Moreover, the risk-based and DRO models improve system reliability, resulting in lower unmet demand and reduced diesel generator (DG) usage. Specifically, compared to the expected-value-based model, the WC- and CVaR-based models, despite increasing construction costs by 20 % and 10 % respectively, achieve approximately 85 % and 50 % reductions in unmet demand and 57 % and 30 % reductions in DG usage across different seasons, on average. Furthermore, although the DRO model incurs a 9.8 % higher construction cost than the expected-value-based model, it demonstrates approximately 46 % and 28 % reductions in unmet demand and DG usage, respectively, across various seasons, on average.