We theoretically study the Josephson effect in a superconductor/normal metal/superconductor ({it S}/{it N}/{it S}) Josephson junction composed of $s$-wave {it S}s with {it N} which is sandwiched by two ferromagnetic insulators ({it F}s), forming a spin valve, in the vertical direction of the junction. We show that the 0-$pi$ transition of the Josephson critical current occurs with increasing the thickness of {it N} along the junction. This transition is due to the magnetic proximity effect (MPE) which induces ferromagnetic magnetization in the {it N}. Moreover, we find that, even for fixed thickness of {it N}, the proposed Josephson junction with the spin valve can be switched from $pi$ to 0 states and vice versa by varying the magnetization configuration (parallel or antiparallel) of two {it F}s. We also examine the effect of spin-orbit scattering on the Josephson critical current and argue that the 0-$pi$ transition found here can be experimentally observed within the current nanofabrication techniques, thus indicating a promising potential of this junction as a 0-$pi$ switching device operated reversibly with varying the magnetic configuration in the spin valve by, e.g., applying an external magnetic field. %with the magnetization configuration in the spin valve. Our results not only provide possible applications in superconducting electronics but also suggest the importance of a fundamental concept of MPE in nanostructures of multilayer {it N}/{it F} systems.