I think a lot of it comes from Christianity. The Bible is full of allusions to darkness and light. Remember, our culture has been predominantly Christian for centuries. In the Bible, the light refers to the light of truth and, ultimately, Jesus. Darkness is a metaphore for ignorance and sin, thus evil.