Turn celestial coordinates into light years
Rectangular celestial coordinates are used regularly. The most common examples are the JPL ephemerides for solar system objects. Wikipedia's page on geocentric equatorial coordinates includes the equations required to convert right ascension and declination to xyz.

The most commonly used reference system for astrometry is the ICRS coordinates that are closely aligned with the J2000 equatorial system. Implementaions of ICRS were used for the Hipparcos and Gaia astrometry data.