You are welcome.
Put yourself in a moth's position - you sense light, but only direct light, with a source you can move towards - such as a bulb or a candle - so you head for the source.
The sun spreads its light over several million square miles, so it has no obvious source that a moth's senses would pick up. We can know the sun is the source of light, because we are rather more sophisticated than a moth (well when you look on here you do wonder ....) so we can appreciate the sun - or any ambient light - as a light source.
A moth needs something direct and within reach to be an attraction.
Hope that clear it up a little better.