You need meat to build muscles.
No, you don't!! What you need are complete proteins, with all of the essental amino acids (in the appropriate quantities) to build muscle.
That does NOT require meat consumption. With that said, it's much easier to get those proteins from animal sources than it is from vegetable sources. Most vegatarians are lacto-ovo ones (they consume milk and eggs but don't eat animal flesh). It's not that hard to get the protein you need, if you go that route.
Vegans, folks who eat no animal products at all, have their work cut out for them. Only one veggie source has all those EAAs (soy). Therefore, they have to combine certain veggies (i.e. legumes) with other veggies and/or grains to get complete proteins. And, many of these veggie sources are high in fiber and water, thus making consumption in high quantities quite difficult. Red beans and rice is a popular vegan protein meal. Lentils and corn is another, I think.
One thing is certain: if you do go the vegetarian/vegan route, you'd better have your diet down COLD, if you expect to see any major gains.