This can be dependent on a few things. For larger organizations like airlines resources may not be an issue (they generally have pilots needed to move the planes). For smaller organizations it may come down to a few factors. First off do you have the people needed to move the planes (and how will you get them back home). Do you have anywhere to put the planes provided you do move them, you will need tie downs else where not to mention its going to cost you to store them elsewhere. On that note, can you foot the bill for such a move (not only the planes but the fuel, pilot housing or return trip etc...). If you want to see some of the damage and thought process for smaller planes check out this thread on the recent hurricane.
Often airlines will cancel inbound flights in advance of a hurricane so there will be fewer airplanes turning around at a potentially effected airport anyway. For the planes parked there (for what ever reason) they may they may simply move planes out of the airport,
Airlines are moving some planes to hangars while flying other planes
out of the area entirely until the storm is over.
FWIW commercial airframes are fairly transient by nature anyway, so as long as its not the location of a hub city the planes are in and out anyway.
While they have access to way more resources it looks like the Airforce moves planes appropriately.
As to what conditions lead to this decision its hard to say and ultimately up to the operator in question. Generally I would think they would err on the side of caution. But from a purely economical standpoint (potential damage aside) its may be more cost effective to move the planes and use them elsewhere than have them sit on the ground anyway (since the airports will be closed).