The idea of light being good, and dark being bad, is common in such expressions. You could describe someone who is very intelligent as 'brilliant', and someone who is not as 'dim'. There is the 'dark' side to things, but some people are all 'sweetness and light'. If a politician were accused of corruption this would 'cast a shadow' over his career. Since it 'darkens' his reputation.
In your example, 'path' does not refer to a road, but the path of life, a metaphorical path that each man is said to walk. So in casting a shadow over another's path you are causing him harm or distress in some manner.
- For Teachers