People who make their own music are composers. People who play or sing music are “performers”. It is important for both composers and performers to understand what makes the music sound the way it does. In the times of the Ancient Greeks the famous philosopher Pythagoras tried to explain how instruments are tuned. He understood the science of the good vibrations that the instruments make and explained how and why the octave is divided into twelve parts(in some cultures).
In the Middle Ages there were several famous music theorists who wrote books about music theory. Their ideas are interesting for us because they tell us what people thought about music at that time.
In the 18th century some composers wrote books on music theory. Carl Philipp Emanuel Bach (son of the famous Johann Sebastian Bach) wrote a book called: “An Essay on the true art of playing the Keyboard”. Leopold Mozart (the father of the famous Wolfgang Amadeus Mozart) wrote a book called “The Art of playing the Violin". Both these books were extremely well known in their day. In spite of their titles the first halves of these two books are both about a branch of music theory called "performance practice": They tell us a lot about how music was played in those days, how some rhythms were played quite freely and how ornaments in the music were played.
Today people who want to compose will study music theory, perhaps at university or music college. In a conservativey program, they might study harmony and counterpoint as well as form; in other programs, they will not spend so much time on the theories of the past. They will be taught “rules”. These rules are not laws, they simply mean: the way that most great composers wrote music in the past. These rules describe what composers of the past did, rather than telling composers of today what to do -- in fact, music composed today can have completely different rules than the music of the past.
Music theory is important for people who perform music because all these things help people to understand the music they are playing.