Vegetarians can certainly build muscles and actually have a particular plant based diet to achieve their goal. It is really not necessary to consume proteins in the form of meat and eggs to build muscles.
The world renowned bodybuilder Jim Morris actually became a vegetarian in his early fifties and a complete vegan in his late sixties. He was still training and working out in the gym. Surprisingly he felt better and was disease free.
The trick for vegetarians is to maintain a balanced diet that includes fresh fruits, vegetables and pulses. Various nuts and seeds also provide the protein necessary to build muscle.
A lot of bodybuilders, gymnasts and football players are vegetarians and are in great shape. The key is to maintain a clean and healthy diet. Research states that a balanced vegan diet coupled with a vigorous exercise regimen is enough to build muscles. It is better not to undermine a vegan because you might be in for a surprise as they may wind up with a better physique than a non-vegetarian.