When photographing a formal event (i.e. wedding, formal reception, etc...), what should a photographer wear so that (1) he/she will fit in with the context of the event, and (2) it still allows for comfortable movement?
First and foremost, if the photographer is going to be anywhere near the subjects, clothing that is neutral in color should be worn. That means black, white, or any shade of gray between the two. If any other color is worn the photographer risks creating a color cast from the light reflected off the photographer's clothing and onto the subject. Even white may affect exposure levels, so many photographers go with dark gray or black clothing. This usually fits right in color-wise with the gentlemen attending these type events who are usually outfitted in black or gray tuxedos or dark suits.
As to what type of clothing, practices from one photographer to the next vary greatly. I've seen very high level professionals who produce outstanding work shooting weddings in black pants and black polo shirts with the photographer's logo on the upper left chest. I've also seen male photographers who wear dark dress shirts, with or without a tie, and sometimes with either a vest or even a suit jacket. The ladies have it a little easier in terms of clothing, as a simple, comfortable black cocktail dress will usually fit in quite well. But they then pay for that in terms of footwear. Heels? Wedges? Flats? Sandals? For a more detailed discussion of shoes for the gentlemen, see What kind of shoes are best for wedding photography?
When unsure, the best practice, in my opinion, is to consult the host prior to the event, communicate what you plan to wear, and see if that is acceptable to them. If the host requires jacket and tie, then adjust the amount of gear you plan to carry on your person at any one time and maybe even hire an assistant to help you lug the rest around. Oh, and make sure your rate to the host includes the increased cost.
Unfortunately comfortable movement and appropriate clothing don't always go together. The trick is to know what's important. The most important thing is shoes. Get a good pair of dress shoes that have a good rubber sole and are comfortable on your feet.
As far as cloths, my standard outfit for a wedding ceremony is a black suit, white shirt and a tie to match their color scheme if I have one. I then generally lose the suit jacket for the reception, but keep the tie the whole time. The key is that you want to blend in and not be obvious. If you can move freely without standing out, then your life will be far easier than if your clothes are extra comfortable but require staying hidden.
For gear handling, I have a solid black utility belt from lowepro with lens cases and such that I wear around the outside of my suit. Also, I recommend a microfiber tie, they make great lens cleaners in a pinch, particularly if there are humidity issues causing fogging on your lenses.