Can you explain how the "glowing" core gives a cyclic of day and night?
When there is energy from the big bang, you'll have heat, and when have you have heat, you'll have light. When you rub two sticks together, you'll have heat and smoke from the friction, give enough time, you'll have fire and light.
So, let there be light doesn't mean the Sun. It doesn't say, let there be Sun, it says let there be light. The full completion of the Sun will come later on day four. Remember, the core of the earth is a glowing ball of hot molten metal. So, there's your light.