Why do moths fly towards light?

If they like it so much why don't they come out during sunlight hours rather than at night?
8 answers 8