Scientists assume that the Earth and other solid planets and moons formed at about the same time as each other. It has been difficult to determine the age of the Earth itself directly because of the disruption caused by plate tectonics, and the resulting melting and recycling of the rocks. From rock samples collected on the moon, and from meteorites that have been found on Earth that can be dated using radioactive isotopes, scientists feel they have a better estimate of their age, and therefore the age of the Earth. According to the US Geological Survey
...The best age for the Earth (4.54 Ga) is based on old, presumed single-stage leads coupled with the Pb ratios in troilite from iron meteorites, specifically the Canyon Diablo meteorite.
In other words, the radioactive decay of the minerals in these meteorites helps to date the age of the Earth--as well as the rest of the solar system-- to 4.53 and 4.58 billion years ago. The Canyon Diablo meteorite is the name given to the meteorite that created the Barringer Crater near Flagstaff, Arizona.