In general this is a difficult question for Metropolis, you can have a look at these 2 related discussions:
For NUTS and HMC, I think the value is empirically works fine, but there is also no theory behind it.