I believe the light is a symbol for love in the bible while the darkness is a symbol for resistance.
Jesus said those who do evil hate the light and will not come into the light for fear that his deeds will be exposed.
I will give an example of how somebody could hate the love of God: I wanted my parents to believe in God so when my aunt told me that my dad’s brother had died a bear painless death, I tried to reveal God’s goodness to my dad by telling my dad I told a medical student to pray that my uncle would die a painless death instead of suffering.
Instead of understanding my motive, my dad became angry at me and told me I was robbing the doctors and family members who cared for him of the credit they deserve for aiding my uncle in his time of need.
I tried to avoid spending money cause I thought it was disrespectful to God to waste my resources and I complained to a very stingy guy about how a friend of his encouraged me to waste my money and by leaving the restaurant within 30 minutes after meeting me there so that the conversation basically cost me half a dollar a minute. Than the guy tried to punish me for complaining about money wasting by telling the guy who encouraged me to waste money that I was gossiping about him behind my back.
My dad also got angry at me for rejecting a very good looking friend who treated me badly because my dad thought she was popular because of her good looks and could elevate my social status by associating with me.
These are examples of people who hate the goodness of God and view the love of God as something that is bad.