See all of Genesis 1
Unlike other things in Genesis 1, light is explicitly created from nothing. Elsewhere, God says “let there be X” and then a statement follows saying “and God made X”, formed it out of the watery chaos that he presumably created in Genesis 1:1
Targum Onkelos: And the Lord said, Let there be light; and there was light.
Rambam: God thoughtfully willed that, from the upper prime matter, light should pass from potentiality into existence; and it was so forever.
Ibn Ezra: God said effortlessly, “Let there be elemental fire” and there was elemental fire