It's just a neat coincidence! The sun and the moon both happen to have an angular size of about 1/2 of a degree when viewed from Earth.
The orbits of the moon and the Earth are ellipses, not perfect circles, so the Earth-moon and the Earth-sun distances vary a little bit over time. Because of this, the apparent sizes of the moon and the sun vary a little bit as well, so some solar eclipses are more "total" than others.
On Mars, there are no total solar eclipses because the two moons Phobos and Deimos are both smaller than the sun in the sky. On Jupiter, many of the moons are vastly larger than the sun in the sky.
Rebecca H.
(published on 02/06/2016)