surah 113 of the qur'an :Al Falaq (The Daybreak)
In the name of Allah, the Most Beneficent, the Most Merciful.
"Say: "I seek refuge in the Lord of Daybreak
From the evil of that which He created;
From the evil of the darkness when it is intense - or the darkness when the moon sets-,
And from the evil of the women who blow in knots- the evil of malignant witches-,
And from the evil of the envier when he envieth"."
the evils spoken of in the surah share one thing, all of them are thought to be evil or might lead to one to be wary of evil.
the darkness does not harm or cause evil by itself but it does invoke fear, and so to magic which is no more than illusions. consider the magicians of pharaoh "when they cast (their staves and ropes), they bewitched the eyes of the people and struck terror into them with the tremendous magic they produced.” (Quran, 7:115-117)
and so it was no more than bewitching the eyes, but the perceived evil from magic was and remains great nevertheless.
the same goes for the 'envier when he envies', as an envious person might seek to cause harm out of spite, and so the common denominator for the verses is seeking the protection of Allah from the possible effects of the things mentioned in the verses, which do not harm a person by themselves.