I'm wondering if guys like hendrix, frusciante, most punk rock guitar/solo.. were able to understand music theory ?
This is my very rough impression rather than a formal survey, but from reading a lot of interviews and biographies over the years, I get the idea that around a third of prominent guitarists had a significant amount of formal tuition, around a third learned mostly 'by ear', and then the remaining third are somewhere in the middle (perhaps having been in a situation where they could learn non-formally from people around them).
As for 'knowing theory' - well, theory can be seen as a mixture of
- some fundamental rules about how music works
- some terminology and definitions that can be useful when communicating with others
- some guidelines and ideas that are specific to certain musical styles
You could take the view that if you had a good musical ear, you would actually figure out a lot of the fundamental stuff for yourself anyway. Use of a particular set of terminology may not matter to you if you can find another way to communicate your ideas (after all, terminology doesn't affect how the music sounds), and if you're only interested in playing your own style, you might not need to learn a lot about how to play and write in other styles.
Ultimately it shouldn't be a surprise that a lot of prominent guitarists haven't studied a lot of theory, as the field of music theory doesn't (yet) really get to the bottom of how music makes us feel the way we do - so we are all 'figuring it out by ear' to some extent, even those of us who know a lot of theory.
From a practical point of view, the standard way of naming notes (letters A to G, sharps and flats, etc.) is somewhat easier to apply directly to the piano than the guitar, due to the way the piano is laid out.
As a side note, it's worth noting that a much higher percentage of session musicians have studied formally, as the communication and style skills that formal study can teach are more useful in that situation.