The global energy market faces significant challenges due to increasing demand, growing competition, and the ongoing shift toward renewable sources. Addressing these complexities requires advanced methodologies that can effectively navigate uncertainty and optimize investment and operational decisions. This study presents a flexible scenario-based framework for capacity-related decision making and investment planning in energy systems comprising solar, wind, and natural gas facilities. The proposed framework integrates Bayesian Neural Networks (BNNs) into an optimization problem to address uncertainties in energy generation and demand forecasts. By leveraging posterior distributions from BNNs, the framework generates probabilistic, data-driven scenarios that capture future uncertainties. These scenarios are incorporated into a two-stage stochastic multi-period mixed-integer linear optimization model. The first stage optimizes investment decisions for new facilities prior to the realization of uncertainty, while the second stage incorporates operational costs, capacity expansions, and penalties for unmet demand across multiple future scenarios. We present a case study in Texas, demonstrating the applicability of the proposed framework. The results indicate the details on the capacity expansion and investment strategies for natural gas, wind and solar power plants to meet the increasing energy demand in the state. The model accounts for real-world considerations such as construction and expansion lag times, capacity constraints, and scenario-dependent demands. This methodology enhances the flexibility of energy systems, enabling planners to make cost-effective future investments and operational decisions through the complexities of the modern energy landscape. The proposed framework offers significant advantages over traditional methods by capturing nuanced uncertainty distributions and enabling flexible decision-making.