Construction of underground structures (e.g., subway lines, railways and highway tunnels) is inherently hazardous, posing risks to both workers and machinery at the site and to surrounding buildings. The presence of groundwater may increase these risks. We develop a general probabilistic risk assessment (PRA) framework to quantify risks driven by groundwater to the safety of underground constructions. The proposed approach is fully compatible with standard PRA practices, employing well-developed risk analysis tools based on the fault tree analysis method. The novelty and computational challenges of the proposed approach stem from the reliance on a combination of approaches including extracting information from databases, solving stochastic differential equations, or relying on expert judgment to compute probabilities of basic events. The general framework is presented in a case study and used to estimate and minimize risks at a construction site of an underground station for a new subway line in the Barcelona metropolitan area.