Oscillation plays a vital role in the survival of living organisms in changing environments, and its relevant research has inspired many biomimetic approaches to soft autonomous robotics. However, it remains challenging to create mechanical oscillation that can work under constant energy input and actively adjust the oscillation mode. Here, a steam-driven photothermal oscillator operating under constant light irradiation has been developed to perform continuous or pulsed, damped harmonic mechanical oscillations. The key component of the oscillator comprises a hydrogel containing Fe3O4/Cu hybrid nanorods, which can convert light into heat and generate steam bubbles. Controllable perturbation to the thermomechanical equilibrium of the oscillator can thus be achieved, leading to either continuous or pulsed oscillation depending on the light intensity. Resembling the conventional heat steam engine, this environment-dictated multimodal oscillator uses steam as the working fluid, enabling the design of self-adaptive soft robots that can actively adjust their body functions and working modes in response to environmental changes. An untethered biomimetic neuston-like robot is further developed based on this soft steam engine, which can adapt its locomotion mechanics between uniform and recurrent swimming to light intensity changes and perform on-demand turning under continuous light irradiation. Fueled by water and remotely powered by light, this unique hydrogel oscillator enables easy control over the oscillation dynamics and modes, offering an effective approach to self-adaptive soft robots and solar steam engines.