We commonly use the units of meter, kilometer and miles for measuring distances on Earth. However, space is very vast and such units are of little use for measuring the distance of an object in space. For example, the distance of the Sun from the Earth is 149,597, 870,700 meters or 149,597,870.7 kilometers. The distance of the next nearest star, Alpha Centuri, is about 41.32 x 10^12 kilometers. Now, recall that there are few billion stars in our own galaxy and that there are few billion galaxies. Imagine how difficult it would be to report the distance to other stars and galaxies in kilometers or miles and how many zeroes we would have to use.
Thus, much larger units, such as light years and parsec have been devised. A light year is the distance traveled by light in one year and is equal to 9.461 x 10^12 kilometers. The distance to Alpha Centuri is about 4.3 light years, which is much easier to report than its distance in kilometers. Thus, one can see the value of reporting the distance of objects in space in the units of light years, instead of kilometers or miles.
Hope this helps.