how does the sun's energy cause rain