Stochastic methods in atomic systems and QED