Theory:

A light-year is defined as the total distance travelled by light in one year.
The speed of light is about \(300,000\) \(km\ per\ second\). The distance covered by the light travelling at a speed of \(300,000\) \(km\ per\ second\) in a year gives one light-year.
 
Value of the light-year:
The value of one light-year can be calculated by knowing the speed of light and the total time taken by the light in one year (in terms of \(seconds\)).
 
The general formula for speed is given as,
 
Speed=DistanceTime
 
Speedoflight=3×105km/sec
 
The time taken in terms of \(seconds\) is simplified as
 
Time=365×24×60×60=3.154×107seconds
 
Lightyear=Speedoflight×Time
 
Lightyear=3×1053.154×107
 
1lightyear=9.4607305×1012kilometres
 
Light from the Sun:
The Sun is nearly \(150,000,000\) \(kilometres\) (\(150\) \(million\ km\)) away from the Earth. Light takes about \(8\) \(minutes\) to travel from Sun to Earth.
 
earth-1756274_1280.jpg
Sunlight
 
Calculation of light-year:
Proxima Centauri is the nearest star at a distance of \(40,000,000,000,000\) \(km\) from the Earth. To find the distance of Proxima Centauri in terms of light-years, divide the distance given in \(kilometres\) by the value of one light-year.
 
Lightyear=40×10129.4607305×1012=4.228
 
In terms of light-years, the distance is approximately \(4.23\ light\ -years\) from Earth. Likewise, the distance of another star, Alpha Centauri, is the second-closest star at \(4.3\ light\ -years\).
 
Looking at the past:
 
The star we are looking at is the star that was in its respective position many years ago. The light emitted from the stars takes so many years, depending on the distance to reach our eyes, making us look into the past. For example, if a star located at a distance of \(10\ light\ -years\) is getting exploded at present, then the explosion can be viewed only after \(10\ years\). This is because one light-year is the distance covered by light in one year.