I also had difficulty understanding how to change WorldEnvironment values in GDScript.
Seeing the answer you got, I understood (but it took me a while to realize) that in the case of WorldEnvironment, it's not enough to write in GDScript the name of the WorldEnvironment + ".attribute". To work, you need to write WorldEnviroment + enviroment + ".attribute".
$WorldEnvironment.glow_intensity = value
$WorldEnvironment.enviroment.glow_intensity = value
I think the documentation could have some example of using WorldEnvironment to facilitate the learning of those who are learning GDScript (as is my case).
As always, thanks to the Godot community for this amazing tool.