What are the advantages of a variable-incidence wing as used in the F-8?
The main reason for having variable incidence wing in the F-8 was that it allowed the production of increased lift due to a greater angle of attack without reducing pilot visibility as the fuselage stayed level. 

For aircraft with high angle of attack TO/landings (like delta winged aircraft), pilot visibility is a problem in low speed landings, as the nose will obstruct the runway (or carrier, for that matter) in extreme cases. There are two ways to solve this problem:


Droop the nose, like the Concorde or
Make the wings variable incidence, like the F-8.


The first option is usually preferred (same thing was done in Tu-144) as the weight penalty is (significantly) less. However, this wasn't possible in the F-8 as the engine air intake was in the nose; so the incidence of wings was changed. The variable incidence wing had the added advantage of reducing the length of landing gear required and improved the low speed characteristics.

In case of Martin XB-51, the variable incidence wings were used to reduce take off distance as it was expected to be operated from forward airfields.