As you may have already noticed, my influences range from classical music all the way up to dark metal music. So this brings me to my first point, influence.
I personally believe that almost everything (if not everything) you listen to, will have an impact on your playing style.
You can’t expect yourself to play head-banging riffs when all you listen to is Hip Hop or anything that does not have to do with that style.
Intentionally choosing what to listen to in order to allow yourself to get influenced definitely plays a role in your playing style.
The first guitar solo I learnt was the solo to “Stairway to Heaven” by Led Zeppelin which is quite popular among most guys who have started to get into soloing regardless of what kind of music they desire to play.
This solo uses a lot of the pentatonic scale which is probably the most popular scale in any genre or style of music aside from the regular major/minor or harmonic minor scales.
Once I learnt the solo, I learnt the ways we can use the pentatonic scale. Now I was actually well aware of the pentatonic scale before I even learnt the solo but it was after I learnt this solo when I saw how and where to use the scale.
My point here is that, knowing theory and all that nerdy stuff is quite important but you would only be able to use what you know, when you see how it is supposed to be used.
Being able to practically apply what you know comes only when you have had the experience of using the technique. And the easiest possible way to do that is finding songs that have those particular techniques you are looking for and learning them first.
It is always helpful when you are looking for a particular kind of sound.
For example, the diminished chord. If you’re looking for how to use that chord while soloing, “Road Trippin’” by Red Hot Chili Peppers and if you’re looking for where you could use it while creating chord progressions, “Michelle” by The Beatles are great examples.
Similarly, you can find almost any technique or complicated chords and even funny time signatures in a huge variety of songs and pieces.
All you need to do is find them, learn and imitate them even if the song you found isn’t in the style or genre you were trying to play in.
Once this process is completed, the chances of you being able to apply that to your compositions or maybe even an addition to the library of riffs you have in your head while freestyling would increase significantly.