Solar variability as an input to the earth's environment