Other side of the Moon would impose unnecessary communication complexities without much optical benefit. Earth-Sun L2 point is much better because Earth's shadow blocks most of heat from the Sun, plus the probe needs heat shield only on one side to block remains of heat from Sun, Earth and Moon.
See: https://en.wikipedia.org/wiki/James_Webb_Space_Telescope#Sun...
building on the surface of the moon is not without benefit. as a static location, it would be much easier to build larger sensors with larger mirrors, rather than having to build one giant thing and hope it deploys safely. You could build an arbitrarily large-sized mirror. Or, you could build large radio telescopes that do not need to contest with the noise of the earth's atmosphere.
all spectra are important for astrological observations—there is a serious lack of radio observations made with large telescopes outside of the earth's atmosphere in particular.