It is warm near the equator because the sun is more directly overhead rather than at an angle like it is at the poles. The areas that are hit by the rays of the sun are greater at the equator than at higher latitudes.
The sun's path at the equator is also short, resulting in less absorption and scattering. Another factor is that the Earth's surface at the equator results in less reflection of incoming sunshine. During the spring and autumn equinoxes, the sun passes directly over the equator, creating hot equatorial climates with little variation throughout the year. During the solstices, Earth's pole points toward the sun, allowing surrounding areas to receive more radiation while the opposite pole does not receive any. Without snow at the poles, the poles could be as warm or warmer than equatorial regions during their summer.
Not all equatorial regions have humid climates. Mount Kilimanjaro in Tanzania has cool, dry weather with alpine glaciers due to its altitude. The Andes is a region that includes a desert with almost no rain. Because of Earth's spherical shape and its equatorial bulge, incoming solar radiation is not equally distributed over the planet. The sun lights only half of the planet, and maximum radiation is experienced at local noon, while less radiation occurs at other times of the day.