The sun provides light and warmth to Earth, and its gravity keeps the planet and other bodies in the solar system in their orbits. The sun's energy also drives weather patterns and supports all life on Earth through photosynthesis.