How does the sun transfer energy to Earth?

By making earth spin


By mechanical waves


By electromagnetic waves


By the Earth revolving around the Sun