Revelation 22:5 sometimes causes confusion, leading people to believe (wrongly, as it turns out) that there will be no sun in the New Heavens and New Earth. Here's a reminder of what it says:
"And night will be no more. They will need no light of lamp or sun, for the Lord God will be their light, and they will reign forever and ever."
Notice that this text doesn't say that there will be no sun in the New Heavens and New Earth. It says that there will be no need for any illumination (whether from a lamp, or from the sun) because the Lord our God will shine on us. Even if the reference to the "sun" is a literal reference to our nearest star (which is distinctly doubtful; see Beale's commentary on Revelation), this text doesn't say that this star won't exist in the New Heavens and New Earth any more than it says that torches and lamps and Android cameras with built-in lights won't exist any more. The point is not that such-and-such a light source won't exist, but that the brightness of God's presence will render such light sources unnecessary.