Yes. But solar is pretty inefficient. It's dependent on the weather. It takes up a lot of space, and the energy density of photoelectric solar cells is pretty low compared to other sources of energy we have access to (but perhaps lack sufficiently advanced engineering knowledge to control). Why would use use the sun's sloppy seconds when you can just do what the sun does to create energy (fusion)--that's the dream anyway. Until then, we should just improve nuclear so much that the mistakes of the past seem obviously stupid in hindsight.
I'm not saying we shouldn't use it, but if we're talking about things we "shouldn't say we shouldn't use to mine Bitcoin," Nuclear should be at the top of the list.