If you don't mandate anything, then they're going to build the dirty one.

So what kind of laws would lead to the orbital option being preferred over the ground-based clean option?

Well, arguably from the get go an orbital datacenter would be better. If launch costs were low enough I would say that as much industry as possible should be moved off planet, and we should make earth into a garden?

We're still doing all the mining and manufacturing on Earth, and there's so much empty land. The final product of self-powered datacenter is among the lowest priority of things to get away from us, and not an effective place to spend environmental mitigation money. And then when they re-enter they pollute pretty badly.