Some lasers can and are pumped by sunlight
without the electricity step. It's done with YAG. Concentrated sunlight is necessary to create the inversion, and more dopants in YAG help absorb more light. A team in Japan did it.
A laser diode needs a damn power density to operate, essentially because the lasing particles (electrons and holes) are very concentrated. In a YAG, the colour centres (Nd doping) are dilute so exciting most of them takes less power density.
Since a laser diode operates already near its destruction, any pumping scheme that is less efficient then electricity may be immediately fatal. The present current density in metals nearly zaps them. The power density uses to be almost the burning value. But if the pumping light is filtered and gets efficiently absorbed, it would be conceivable.
An other obstacle is that the pumping method must not de-excite the lasing things. Though, if a pumping photon brings an electron from low to high energy, it also does the opposite action with equal ease, so you can't achieve >50% of excited electrons that way, and you get no lasing effect. Optical pumping demands an energy diagram with more levels, where for instance pumping light puts an electron in a first high energy level, from which it falls quickly to a less high one where it stays for long, waiting for a photon to lase and amplify the light.
An other condition is that the emitted light must not be absorbed too strongly. One way to achieve this is when the lasing transition ends on an energy level that the electron leaves quickly, so it can't absorb the emitted light by the inverse transition of the lasing one.
Semiconductors give flexibility to design the lasing medium, and I suppose laser diodes pumped by concentrated filtered sunlight would be feasible, but they would rather differ from current-pumped laser diodes.
I suggested sunlight-pumped lasers (more probably YAG in a near future) for optical datacommunications from space probes and satellites, to save the costly and inefficient solar panels. They would also be nice to analyse from orbit the soil of a celestial body.https://www.scienceforums.net/topic/76627-solar-thermal-rocket/page/2/?tab=comments#comment-807522