Theory of solar irradiance variations