From the point of view of the author of the Pentateuch, the light on the first day probably came from God Himself. The pillar of fire (Exodus 13:21) that provided light for the Israelites is an example. Exodus 14:20 shows how, during the night, it brought darkness to the Egyptians and light to the Israelites. So it was effectively "separating light and dark" like in Genesis 1:4.