While studying doppler effect we study that as the locomotive banging up the horn is moving the produced waves come closer, making wavelength decrease and frequency increase ,and so is the wave heard as shrill and as it is moving ahead the waves in opposite direction move farther,therby increasing wavelength and decreasing frequency so my question is this that is it necessary for vehicle to move faster than speed of sound for Doppler effect to be observed
In response to your subsidiary question (in your comment to C. A. Powers) about supersonic objects: If the object making the sound is moving above the speed of sound (supersonic), then instead of the Doppler effect, a sonic boom is what occurs (example, watch for a few minutes from this point).
Nothing is now heard in front of the object, only behind it, so there can't be a Doppler effect as such1. The Doppler effect is all about the difference between the frequency (or pitch) of what is heard in front of and behind the moving object. That's what C. A. Powers was referring to.
Here is another good explanation:
Sonic booms occur when the source travels faster than the speed of sound. If the source is traveling at the speed of sound, the waves pile up and move along with the source; when the source travels faster than sound, a shock wave (also known as a sonic boom) occurs as waves pile up. The angle at which the shock wave moves away from the path of the source depends on the speed of the source relative to the speed of sound.
1Unless we argue that the difference is now infinite because no pitch exists in front, while waves pile up behind, etc.
A simpler answer.
Things which move towards you sound higher pitched (higher frequency), things moviing away sound lower pitched (lower frequency). If something moves at the speed of sound or faster, you won't hear it until it gets to you. (Sonic Boom)
With light, it's something like the same principle. Something moving towards you has a blue shift (higher frequency) and away, a red shift (lower frequency) and you can use these shifts to measure the speed towards or away from you.
Something traveling at light speed relative to you wouldn't be visible until it got to you. Nothing in the universe can travel faster than light. Read up on the Michaelson-Morley experment. Then Special Relativity.
As a final note, all this happens at below the speed of sound, with sound, or below the speed of light, with light.