Beacuse the weather is based on air pressure too. High air pressure means clear skies so usually warmer.Low air pressure means clouds so usually colder temperatures.
But this all depends where you live. So though the sun affects some you also need to account for air pressire.