The Moon might be solid rock but that doesn't make it a good heat sink. If solid rock was a good heat sink you could just build data centers inside mountains on Earth orders of magnitude cheaper. Rock might eventually dissipate heat but it's not conductive enough to carry it away from heat generating elements to keep them from melting down.
Renewables on Earth include solar, wind, hydro, tidal, and geothermal. Even if your data center was 100% solar you only need enough storage to cover night usage and maybe a few days of total cloud cover. A grid tie is also trivial. A data center on the Moon requires two weeks of power storage and has no grid tie option.
Again, this is all ignoring the literally astronomical cost of getting mass to the Moon.
If you want expensive but non-polluting data centers you'd get more bang for your buck building them on or under the ocean with renewable power attached. A barge or submerged platform with ocean water for cooling anchored off-shore would provide orders of magnitude better latency and be orders of magnitude cheaper.
Eh, the moon is made of pretty cold rock.
> two weeks a month
> half a day every day
Amortized, that's the same thing.