The line from the Bible that explains why God created light is
"And God said, “Let there be light,” and there was light. And God saw that the light was good. And God separated the light from the darkness." (Genesis 1:3-4)
This passage doesn't explicitly state *why* God created light, but it implies the purpose was:
* To bring order out of chaos: Prior to this, there was darkness. Light was the first act of creation to establish order.
* To create goodness: God saw that the light was good, indicating a value judgement and purpose.
* To establish distinction: Separating light from darkness created day and night, further establishing order and distinction.