This is due to the difference between the Critical or Minority Text and the Received Text (also known as the Textus Receptus) in this verse.
The Critical Text has φωτος (photos) which means "light," whereas the Received Text and also the Majority or Byzantine Text both have πνευματος (pneumatos) which means "spirit."
The NASB is based on the Critical Text which is why it has "Light" here, as do most of the other more modern translations since they are also based on the Critical Text. The KJV is based on the Received Text and so has "Spirit" here, as does the NKJV which is also based on the Received Text and includes a footnote stating the alternate reading of the Critical Text:
(for the fruit of the 2Spirit is in all goodness, righteousness, and truth),
"NU" stands for Nestle-Aland and United Bible Society.
To my knowledge the WEB (World English Bible) is the only English translation based on the Majority or Byzantine Text, which matches the Received Text very closely, though they are not identical and do differ in various places of the New Testament. The WEB has "Spirit" here as well:
for the fruit of the Spirit is in all goodness and righteousness and truth,
However the Latin Vulgate also has "light" as can be seen from the Douay-Rheims, which is an English translation of the Vulgate:
For the fruit of the light is in all goodness and justice and truth:
as does the Syriac as can be seen in James Murdock's English translation of the Peshitto:
For the fruits of the light are in all goodness, and righteousness, and truth.