Keep regular backups until Notch provides a form of protection against this or a way to disable thunderstorms.
If you see a thunderstorm get far enough away that the chunks containing your treehouse are unloaded.
EDIT :
As of Minecraft 1.6, fire is severely nerfed and will not burn through your buildings like before.
Consequently, lightning is also nerfed, and may not be worth worrying about, unless you structure is made of difficult to replace flammable materials, such as certain colours of cloth and leaves.
EDIT 2
: Leaves are now replaceable due to the ability to cut them with shears in Minecraft 1.7.
As a result, even treehouses no longer need to fear lightening.
gaming.stackexchange.com/users/109/Macha
Just sleep through the thunderstorm.
Use a bed when one appears.
gaming.stackexchange.com/users/4393/Resorath
The latest Bukkit Recommended Build (#733) has rain putting out fires like it should.
And since lightning only occurs during rain, you shouldn't have any issues.
If you are on an SMP server, suggest they update to the latest Bukkit as soon as possible if they have not already.
I'm still confused on if the Vanilla (Default Mojang)
Minecraft server has this issue or not.
gaming.stackexchange.com/users/7511/EdGruberman
I know it isn't such a problem anymore, but if you want to get rid of visible weather effects, there are two solutions that involve commands.
You could consider the /fill command with Barriers.
If you don'talready know what Barriers are, they are the equivalent of invisiblebedrock, obtainable only with the /give command.
The commandformat for using /fill reads as follows.
(X means the X coord, Ymeans the Y coord, etc.)
/fill
(X) (Y)
(Z)
(X2)
(Y2)
(Z2)
minecraft:
barrier Do this above where the player(s) will walk, and problem solved!
You could have a command block that is programmed with /Weatherclear and have a button so every time it stormed, sunny skies wouldbe back at the push of a button.
The only question is, are you in Multiplayer?
No cheats?
If so, this is out of my league.
gaming.stackexchange.com/users/118326/Rainbow Dash
Do /gamerule
dofirespread false This stops blocks from burning
gaming.stackexchange.com/users/238678/user238678
I found a different solution to this pretty old question that some people might be interested in: Create a sprinkler system.
The idea is as follows:
Put a source block of water at various places inside the walls/ceilings, locked up by blocks that can burn.
When the wall or ceiling burns down, the blocks holding your water in place will be removed by the fire and the water will escape, dowsing the fire and preventing it from spreading any further.
Side effect is that this also removes certain items such as torches, but those can easily be replaced.
It's pretty effective at saving most of your building from fire if something happens, be it lightning at the very end of a thunderstorm, lightning during snow or just a user error such as a fireplace being too close.
It is not fast enough to prevent the spread of fire towards the ceiling though.
Put your sprinklers high up to dowse it quickly there.
I haven't gone any further, but in theory you could also unleash the water using redstone when certain blocks disappear.
This way you could make the system more sensitive and dowse the fire earlier.
In practice this is a bit infeasible to implement because it needs a lot more space and planning.
gaming.stackexchange.com/users/217301/Ghostkeeper
What's the best way to  lightning proof  a structure? I've seen some people attempt to place a 'ceiling' of glass at the top-most level of the map, but I don't know if this works or not (and it's a tad unattractive)... I'm a bit worried for my tree-house:
How to lightning-proof a structure?
gaming.stackexchange.com
<minecraft-java-edition>
gaming.stackexchange.com/questions/21199
gaming.stackexchange.com/users/3610/fredley
You could have a command block so everytime there's a storm it would clear the weather. You could also get far away every time there's a storm so the chunks containing your treehouse are unloaded. Regular backups are important or a Bukkit update if on an SMP server. Commands with Barriers is also a viable option.
Regular backups until another form of protection is available Bukkit update if from an SMP server Using commands with Barriers seems to be a favourable option. 