Not all planets have moons. In the solar system, Mercury and Venus do not have any moons orbiting them. All of the other planets, including the Earth, have one or more natural satellites.
Scientists are not entirely sure why Mercury and Venus lack moons altogether. According to one theory, as the two innermost planets in the solar system, they are close enough to the sun that the sun's gravity overwhelms their own gravitational pull. Any satellite that formed around Mercury or Venus during the origin of the solar system (or any asteroids captured later on) would eventually be tugged away from those planets by the sun's much stronger gravity.