what is chess theory


One use of the word theory in chess is indeed in "Opening Theory". It is really a misuse of the word because what is called opening theory is actually the organised mass of actual moves that have been played in the opening and the judgfements as to wbhat is good, what is playable and what is defintely bad, as well as the type of play that follows.
Chess opening theory is not "theory" in the sense that the word is used in everyday life (i.e. as an idea about how something works or why it is the way it is ... equivalent to a scientific hypothesis) nor is it theory as the sense that Quantum Mechanics and Relativity are theories (i.e. well supported ideas about deep principles and concepts)
But chess does have those kinds of theory too. It is to be found in books on the middlegame and endgame.

Yes, I think M&P is quite right. Much of what is called theory is simply knowledge of opening variations and lines, and isn't really 'theory' is the strict sense of the word. That said, there are aspects of chess theory, some alluded to by M&P, which might well be said to be properly theoretical. A number of these might be found in Nimzowitsch's My System, for example, where he offers insights, which may be said to theoretical, about the nature of blockade, prophylaxis, weak squares, over-protection, etc. More basic theoretical ideas might include the elementary principles of development and control of the center, and of course there are general principles of end game play to be learned that when expressed in general terms may be said to be theoretical. Properly theoretical ideas in the opening, as opposed to knowledge, do exist, however, and might, for example, include such propositions as 'it is important for white to prevent black playing d5 in open variations of the Sicilian (hence the popularity at different periods of the Maroczy Bind incidentally), as this move will allow black to free his position'. This is not knowledge of a particular line but a theoretical idea in my opinion. Nevertheless, it remains true that the term 'theory' in chess is, as noted above, often used simply to mean knowledge of particular openings.
One might also say that understanding of openings may be theoretical in another sense. The accumulated weight of knowledge of any particular variation may determine that the consensual opinion of that variation at one period is that it not very good. Sometimes, however, this view may be challenged by the discovery and OTB play of a 'new move' that will resuscitate that variation or line and make it 'theoretically playable' again (at least until it is refuted or, as often happens, it falls out of grandmaster fashion). In that sense particular openings, or more properly particular variations and lines, may be regarded as variously theoretically 'sound', 'unsound', 'dubious', 'risky', 'sharp', 'solid', etc. at different historical moments.

there is end game theory also, so thats not true that theory only pertains to the opening, theory is used in many ways, theory doesnt necessary mean good variations either, there is plenty of BAD theory

Theory in science was meant to be an act to explain something . . So . . In simple term . . Chess theory was meant to be the answer for the all whys questions in chess world .

Chess opening theory is not "theory" in the sense that the word is used in everyday life (i.e. as an idea about how something works or why it is the way it is ... equivalent to a scientific hypothesis) nor is it theory as the sense that Quantum Mechanics and Relativity are theories (i.e. well supported ideas about deep principles and concepts)
--------------------
It is theory in the classical sense because it is hypotheses about how we should play backed by history and results, but we cannot be sure and it cannot be proven until we have a supercomputer that discovers the "winning algorithm."