Do you need music theory to create music?
This question gets asked a lot. It's really four questions: 1) What is music theory? 2) Does music theory really teach you what music is? 3) Does music theory teach you how to create music? And 4) how do you learn music theory? Let's take these questions one at a time.
What is music theory?
There is no singular "music theory;" there are many music theories. In American schools, they mostly teach a rule set abstracted from the tastes of the Western European aristocracy between about 1700 and 1850. Learning this rule set is very useful for understanding Western common-practice tonal music. If you want to write music using functional harmonies based exclusively on the diatonic scales, tonal theory is great. However, if you want to make or understand any other kind of music at all, tonal theory is not adequate, and in some ways actively harmful.
Western listeners like diatonic harmony to a point, but it sounds tame and boring in some contexts, and positively wrong in others. Tonal theory has nothing to say about the blues or any of the music derived from it, which is a pretty serious shortcoming if you want to operate in any kind of popular idiom. Modality is an advanced topic in tonal theory, but it's a basic necessity for pop, which treats everything modally, including the major scale. Tonal theory places a ton of emphasis on the V-I cadence, but you can listen to non-classical music for a long time without hearing any cadences at all.
Jazz theory is better, because it maps more closely to contemporary popular practice than classical. However, jazz also has its specific conventions, some of apply generally, and some of which don't. Jazz textbooks at least mention the blues, but don't attempt to explain it, or when they do, they often explain it wrong. The final authority has to be your ears reacting to actual music.
Finally, music theory tends not to have much to say about timbre, production, mixing, copyright and authorship, or technology, all of which are foundational knowledge for electronic music producers.
Does music theory really teach you what music is?
It does in some respects. Classical theory naturally does a good job of explaining classical music; that's what it's for. Jazz theory does a good job explaining jazz. Both theories explain some aspects of contemporary pop well, but are silent or incorrect about other aspects. Theory is certainly not enough to learn everything you need to know about music. Actual practice is full of strange quirks and exceptions that are as necessary to your understanding as the basic rules are. Also, most current music draws from a variety of cultural sources, not just Europe and the United States, but every other continent as well. To make really satisfying music in the present, you need to know something about how Indian and Asian and African musics work too.
Does music theory teach you how to create music?
Sort of. Theory is a systematic way of understanding conventions. If you want to create conventional music, you just apply your theory rules, and everything comes very easily. When I work with pop and rock musicians, my theory knowledge is a timesaver for solving some kinds of problems: writing basslines and harmonies, i.e. figuring out which notes will sounds good or bad against a given chord, and which chords sound good or bad in which situation. Knowing a variety of music theories gives me a bigger toolkit. I know when to use diatonic harmony, and when to deliberately avoid using it, when to use parallel fourths and fifths, when to use unresolved tritones and clusters, and all that good stuff. This knowledge makes me an exceptionally good craftsman. However, it doesn't make me an artist. Theory ultimately tells you nothing about what to do or not to do. It tells you what the conventional thing to do is, and that's useful, but it's ultimately up to you to follow convention or not. That's where artistry comes in.
Michael Jackson and the Beatles were famously ignorant of formal theory. They did all of their learning by ear, working from actual repertoire. They most certainly understood how music worked, but their knowledge was implicit, not explicit. They might not have been able to explain to you why a certain chord sounds better after another one, but the important thing is to know that it does, not why it does. It probably took them longer to solve musical problems by brute force trial and error than it takes me, but who cares? Their music is enormously, colossally better than mine, and that of any of the authors of any of my theory texts. You might argue that Michael Jackson and the Beatles did end up learning theory implicitly, but they certainly never did it in a way that would have earned them a music degree.
How do I learn music theory?
Some people are formal learners. I'm one. I like systematic thinking and am good at it. Once I realized that I needed to learn all of the modes of all twelve major, harmonic minor and melodic minor scales in order to understand jazz, I just sat down and did it, and enjoyed doing it. However, this type of learning is not equally effective for everyone. If you find theory confusing and discouraging, don't let it bog you down. Learn by ear, by trial and error, through your own idiosyncratic approach. It might be slower and more difficult, but there are many paths up the mountain.
Like I said above, theory is neither necessary nor sufficient for artistry. I know plenty of well-schooled musicians who lack the confidence or emotional maturity to make good art. I know plenty of perfectly naive musicians who make beautiful work. I have yet to see a decent formal explanation of the blues, which is why I'm hard at work writing one. Theory is unhelpful for understanding oddballs like Thelonious Monk, but it's the oddballs who make the interesting art. And theory can't tell you how to make a good-sounding recording, which in electronic music is 90% of the art form.