Astronomical units (AU) are used to compare the distance between "objects in the solar system".
Explanation:
For planet size, distance comparison metric measurement including astronomical units are used.
Most objects in space are far away where astronomical units is insufficient to measure. Light years are used for measuring distances to objects in space.
One astronomical unit = 93 million miles = 150 million kilometres
Another unit of distance is called parsec which is 3.26 light years.