Ionic liquid gating has proved to be effective in inducing emergent quantum phenomena such as superconductivity, ferromagnetism, and topological states. The electrostatic doping at two-dimensional interfaces relies on ionic motion, which thus is operated at sufficiently high temperature. Here, we report the in situ tuning of quantum phases by shining light on an ionic liquid-gated interface at cryogenic temperatures. The light illumination enables flexible switching of the quantum transition in monolayer WS2 from an insulator to a superconductor. In contrast to the prevailing picture of photoinduced carriers, we find that in the presence of a strong interfacial electric field conducting electrons could escape from the surface confinement by absorbing photons, mimicking the field emission. Such an optical tuning tool in conjunction with ionic liquid gating greatly facilitates continuous modulation of carrier densities and hence electronic phases, which would help to unveil novel quantum phenomena and device functionality in various materials.