The Thalmor rule the faction known as the Aldmeri Dominion. They are Elite and never refer to themselves as Aldmeri, however it is widely known that they are affiliated with the Dominion because of the Banner they proudly carry. The Thalmor aren't in the Stormcloak / Imperial conflict. Instead they watch and study. They don't care who wins, they've improvised and planned what to do in the event of either side winning. This is a diversion to the Empire. The Empire pours resources into fighting in the conflict as well as keep their borders secure, and the Nord rebellion tries to break Skyrim away from the Empire. Without the funding of the Empire, the Thalmor might as well come unarmed and conjure bound weapons to conquer Skyrim. The Thalmor may be very dictating and cruel, but note that the Thalmor were created in the 3rd Era to combat the Oblivion Crisis; and that humanity has bullied elves since Yesgramor swept through Skyrim and forced the Snow Elves underground in the 1st era where they became the vile Falmer. In the new release of the Elder Scrolls Online, the Thalmor don't exist; it is the 2rd Era, and Queen Ayrenna leads the Aldmeri Dominion against the Empire: against human oppression.
Hope that helps,
Happy adventuring! 
This is just what i've learned and i might be wrong. Yet to answer your question: The Thalmor aren't with the Imperials. And my personal opinion of the Thalmor: They're extreme, but yet i kind of can't blame them after countless centuries of human oppression.
Edited by HelenaLaraCroft231, 23 April 2014 - 10:35 PM.