Superconductor/ferromagnet bilayers are known to exhibit nontrivial dependence of the critical temperature T_c on the thickness d_f of the ferromagnetic layer. We develop a general method for investigation of T_c as a function of the bilayer's parameters. It is shown that interference of quasiparticles makes T_c(d_f) a nonmonotonic function. The results are in good agreement with experiment. Our method also applies to multilayered structures.