We measure distances in universe by the units of light year/s or parsec. Which means distance traveled by light in one year equals one light year. Thus the lights we receive from the distant stars or galaxies are coming from many light years away.
So how do we know the age of the light so that we determine the distance it has traveled to reach earth?