See Explanation Below
A light year is the distance a beam of light travels in 1 year which is 9.4607 × 1012 km (nearly 6 trillion miles)
So therefore a light years isn't a way to measure time but rather distance
A light-year is a distance unit of measure.
Asking how light-years are used to measure distances is the same as asking how meters or kilometers are used to measure distances.
Meters are used, when the distance that you are trying to express is convenient to express in meters.
If the distance is more than a 1000 meters, then the convenient unit of measure is kilometers so that is what is used.
When astronomers and cosmologists measure distances to anything outside our solar system, the convenient unit of measure is usually light-years so that is what is used.