What do airlines typically do if a long-haul flight is canceled due to bad weather? I'm interested if they prefer to change your ticket to other date or just return the money. How can you protect yourself from such situations?
The specific terms under which an airline will rebook you, refund you, or otherwise are laid out in its Contract of Carriage (or Conditions of Carriage), which in turn may be constrained by regulations in the country where the airline is based or where the flight is operated, as well as various international treaties.
In the event of bad weather, most U.S.-based airlines will attempt to reschedule you on a later flight on the same airline. Naturally, this works out better on routes where there are twelve daily departures than where there are one, as with many international routes. Because phenomena like bad weather, volcanoes, sunspots, air traffic control restrictions, and the like affect all airlines, they are unlikely to endorse your ticket to a different carrier, unless the situation is extraordinary, or you are an extraordinarily high value customer to them. If you cannot wait two days for the next available seat, they may issue a travel voucher or partial refund.
For example, according to the American Airlines CoC, bad weather ("meteorological conditions") constitutes a "Force Majeure Event":
American may, in the event of a force majeure event, without notice, cancel, terminate, divert, postpone or delay any flight or the right of carriage or reservation of traffic accommodations without liability except to issue an involuntary refund. The involuntary refund will be made in the original form of payment in accordance with involuntary refund rules for any unused portion of the ticket. American will also reserve the right to determine if any departure or landing should be made without any liability except the afore mentioned involuntary refund.
Force majeure events encompass quite a few things that it is difficult to plan for; from the United CoC these include
a) Any condition beyond UA’s control including, but not limited to, meteorological or geological conditions, acts of God, riots, terrorist activities, civil commotions, embargoes, wars, hostilities, disturbances, or unsettled international conditions, either actual, anticipated, threatened or reported, or any delay, demand, circumstances, or requirement due directly or indirectly to such condition;
b) Any strike, work stoppage, slowdown, lockout, or any other labor-related dispute involving or affecting UA’s services;
c) Any governmental regulation, demand or requirement;
d) Any shortage of labor, fuel, or facilities of UA or others;
e) Damage to UA’s Aircraft or equipment caused by another party;
f) Any emergency situation requiring immediate care or protection for a person or property; or
g) Any event not reasonably foreseen, anticipated or predicted by UA.
Given that, I would say the best real protection is purchasing an insurance policy that will cover you in the event of the above situations, either by reimbursing you room and board while you wait or for alternative transportation. Be careful, though, as much travel insurance in fact excludes these very same conditions.