I remember weather affecting spells being mentioned already by Larian when the first short gameplay video was released. Like rain making lightning spells more effective (and making fire spells ineffective).

The thing with the moons affecting magic is likely inspired by the Goldbox Dragonlance RPGs.