Estimation of tail probabilities in systems that involve uncertain parameters or random forcing is important when these unlikely events have severe consequences. Examples of such events are hurricanes, energy grid blackouts, or failure of engineered systems. After explaining the challenges of estimating rare event probabilities, I will make a connection between extreme event probability estimation and constrained optimization that is established by large deviation theory. The approach leads to practical methods to estimate small probabilities, and a novel class of challenging, large-scale PDE-constrained optimization problems. I will show examples governed by the shallow water equation where one is interested in estimated the probability of large tsunamis on shore, and the randomly forced Navier Stokes equations, where one is interested in the probability of large point strains.