الْعِلْمُ كَالنُّورِ فِي الْهِدَايَةِ.
Knowledge resembles light in giving guidance.
Knowledge and light are different in nature. Light enables physical orientation; knowledge helps a person discern the right course. Guidance is the specific quality selected as their point of resemblance.
The sentence does not claim that knowledge is physical light or that light possesses all the features of knowledge. A simile asserts resemblance in a selected respect, not complete identity.