We don't know.
In Season 2 it is put into a deep cave with no access to sun or anything except rock and dirt. Yet it appears to be still powered.
A possibility from known technology: the robot may have a compact fusion reactor, which could be compact (no minimum critical mass), and use very little fuel (compare nuclear submarines that spend months without refueling), or even extract water vapor from the surroundings for fuel. And it naturally produces intense heat, which is used frequently by the robots. (Or perhaps the aliens finally figured out cold fusion.)
That's just one conjecture. In any case, a civilization that creates interstellar rifts in space probably can probably create a long-lasting portable power source.