Understanding this quote by Feynman This might be more of a question on semantics and interpretation and if this doesn't meet community guidelines, feel free to let me know and I'll delete it.

It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.

Feynman said that once. 
I do agree with this to a certain extent. But consider this - the wave theory was unable to explain things like the Photoelectric Effect and Compton Scattering, whereas the particle theory (by which I mean the existence of photons) couldn't explain interference and diffraction.
Well, aren't both the theories wrong then?
Ideally, there should be one theory that explains all of this. Then why do we take both of these to be true?
 A: Particle-wave duality doesn't simply say the earlier it's-a-particle and it's-a-wave theories are "both right". It combines two ideas:

*

*Measuring an observable ensures the physical state is an eigenstate of an associated operator, even if it wasn't before.

*For some observables, the resulting states can be interpreted as particle-like. For some others, the resulting states can be interpreted as wave-like.

As we currently understand it, everything in nature that can in some experiments look like particles can also in some other experiments look like waves, and vice versa. Neither of the earlier theories can be reconciled with this. And such theories were in any case domain-specific - electricity (light) was believed to be particles (waves) - which our current understanding is not.
A: 
[...] the wave theory was unable to explain things like the Photoelectric Effect and Compton Scattering [...]

This is true. As a result, we know that classical electrodynamics is only an approximation, which fails when quantum effects become important. In many, many areas of practical interest, classical electromagnetism is phenomenally accurate, so as long as we stick to those areas it is very useful.

[...] whereas the particle theory(by which I mean the existence of photons) couldn't explain interference and diffraction.

This is not accurate.  Photons are not classical particles, so they do not obey our naive intuition about how particles behave. They are part of quantum electrodynamics, and in that framework they both interfere and diffract.

To the best of our knowledge, every experiment we've ever performed is consistent with quantum electrodynamics, so if you're looking for a theory of electromagnetism which explains all of our current observations, that would be the place to look. However, QED is phenomenally complicated compared to classical electrodynamics, so if possible we use the latter (perhaps adding some quantum "corrections" by hand if needed).

Well, aren't both the theories wrong then?

This is certainly possible. We know classical elecromagnetism is "wrong" insofar as it is known to be inconsistent with experiment. The same is not true of QED, but it's entirely possible that there are experiments we have not yet devised which will expose some fundamental flaw in QED as well. If and when such experiments are performed, we will have to re-evaluate our understanding of electromagnetism once again - an exciting prospect!
A: 
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.

The term "theory" here means not just math equations, but implicitly some range of acceptable conditions. Today, nobody will use Newton's laws to describe movement near speed of light.
That doesn't mean Newton's laws are "wrong", it just means that the theory doesn't work very well in some circumstances.
A: There is no single-sentence statement which can capture the whole of makes a theory good or bad. In its context, this statement is making the point that in the end what science is about is grappling with the natural world as it is, rather than a more abstract task such as creating beautiful structures of ideas.
In the case of diffraction and photo-electric effect, both the Newtonian particle model is wrong, and the classical field theory model is wrong. In this sense it is not a case of "both/and" but "neither". The quantum field theory model combines particle-like and classical-wave-like aspects, but now the words 'particle' and 'wave' are serving as technical terms in physics discussions, whose ultimate meaning is cashed out in terms of a more careful and complete statement of what quantum field theory asserts.
(A related issue is that one should not immediately abandon an established theory on the first hint of some tension with laboratory data, since it could just be that the experimental apparatus went wrong or its precision was overestimated.)
A: Yes, they're both wrong. Taking the 'semantic' approach, he is asserting a hierarchical relationship: first and foremost is 'experiment', second is explanation.
Some assumptions to make this a bit more substantive:
I assume he is referring to the data or observations from the experiment, and that he is ignoring the possibility in mistaken theory/description of the experiment itself. (An experiment, minimally, makes assumptions about what is and is not measured, which, if wrong, leads to a mistaken sense of what the data is in the first place. We'll assume those assumptions are theory, too.)
Perhaps especially relevant in your example. Because we create theories, it may be tempting to maintain them, whether because of their apparent cohesion or elegance in illuminating complex phenomena. But the fact that they appear right 99% of the time, or are easier to understand/explain phenomena, are subjective appeals that are irrelevant in the face of the full set of observations. The advice is to not be fooled by the appeal of a theory that does not 'agree with experiment'; there must be something wrong with the theory/theories--whether or not you cannot conceive of how or why.
A note about a theory being only right or wrong: There is another semantic element at play here, which is to treat a theory as a singular, categorical explanation that is right or wrong. However, theories implicate many entities and often make multiple claims about relationships between them.
A: There is a difference between "in a specific limit we need another theory" and "the theory disagrees with the experiment".

*

*Newtonian mechanics works pretty well for all experiments and more which it was created to explain.


*We still use wave description of light (and it works pretty well in certain limits)
What he wanted probably to address was the tendency to spare beautiful theories which are not triggered by experimental observation from culling and instead saving them by increasingly complex extensions is not a good trend in physics. Maybe he was a little ahead of the curve here... (one of my favorite books on the topic is "trouble with physics" by Lee Smolin).
