There are two misconceptions lurking around in your question. One is about relativity and the other is simply about wave mechanics.
The Relativity Part
"When a man on a train throws a ball, the resultant velocity of the ball (as seen from the ground) is the sum of the velocity of the train
and the velocity imparted to the ball from the throw."
No! It is never the sum. However, if the relevant velocities are small, one can approximate the actual non-sum answer with a sum. So, if one throws a massive ball with a speed comparable to the speed of light, despite the fact that the ball is massive, the approximation of summing up the velocities of the train and that of the ball with respect to the train wouldn't work. The law that combines velocities is a geometric law--it is the same law for all kinds of velocities. Whether they are velocities of particles with masses or no masses or of entities that are not particles at all, for example, waves. Whether the approximation of summing up the velocities would work or not depends on whether the velocities are comparable to the speed of light or not--not on the mass of the particle per se.
However, there are certain restrictions on what velocities a particle can attain depending on whether it is massive or massless. One can show under rather general considerations that a massless particle must travel at the speed of light. Thus, it is clear that one has to use the full relativistic version of velocity combination law for massless particles--and not the approximate non-relativistic formula. So, that is why relativity becomes glaringly manifest in the case of massless particles.
The Wave Mechanics Part
Now, the fact that the speed of the electromagnetic waves emitted from a torch traveling on a train doesn't depend on the speed of the train is not a unique feature of relativity. It is a general feature of waves that their speeds don't depend on the speed of their source but only depends on the medium that they travel in. For example, the speed of the sound waves (wrt ground) emitted from a speaker traveling on a train would be the same as the speed of the sound waves (wrt ground) emitted from a speaker at rest on the ground.
What is unique about light is that the speed of light is not only independent of the source from which it is emitted but, it is independent of the observer. For example, even if the speed of the sound waves (wrt ground) is the same whether it is emitted from a speaker traveling on a train or from a speaker at rest on the ground, the value of its speed changes depending on the observer (not depending on its source but depending on the observer). This is to say that if the speed of sound emitted from a speaker at rest on the ground is $x$ wrt ground then the speed of sound emitted from a speaker mounted on a moving train would also be $x$ wrt the ground. However, if a train is moving at a speed of $y$ wrt ground then the speed of sound wrt train would be approximately $x-y$. This is what is not true of light. The speed of light is $c$ wrt both the ground and the train. This is because the non-relativistic approximation doesn't work when one is dealing with speeds close to the speed of light.