Originally Posted by The Doctor
I joined the Stormcloaks for no other reason than I hate the Thalmor. With a burning passion. I slaughter any I find on the road. It's worth the ~300 septim bribe I hand out to any nearby guards afterwards, just to see those arrogant sods dead.
There are thankfully several ways to kill Thalmor without getting a bounty on your head. In most cases you can just talk to them and ask what's wrong with worshipping Talos and they'll attack you first, allowing you to put them out of their misery without getting any bounty.
Also, if you join the Companions in Whiterun and advance far enough in that plotline to be invited into The Circle, you can...
shapechange into your Werewolf form and tear the Thalmor to pieces. As long as nobody see you changing in or out of your wherewolf form no crimes you commit while in Beast form will be pegged on you. If you do the Hircine quest (starts in the Falkreath prison by talking to the guy in one of the cells) and pick up the Ring of Hircine you can use it to change to werewolf form as many times per day as you wish. If you have a follower, be sure to park them somewhere out of sight before going werewolf though, or they might attack you.
Killing Thalmor squads in werewolf form is pretty easy since your attacks are incredibly powerful. You can often one-hit kill them with the sprint-power attack move.
And there's also the classic Elder Scrolls method of being allowed to kill someone without being considered a criminal, the Frenzy line of Illusion spells. If they don't see you while you cast the spell it won't affect your criminal record, and they'll attack you (and each other) first, allowing you to kill them without legal consequences.
All handy tools for putting down any Thalmor you encounter.