In 1996 (the year after F. Casartelli's fatal crash), the UCI made wearing helmets a "mandatory recommendation". Many races, including the Grand Tours have required helmets since 1996. At that time, riders were mandated to wear helmets at all times with the only exception being that they could take off the helmet for the final climb on mountain top finish stages and questionable "fairing only" type helmets were legal for TTs.
When Andrei Kivilev died in Paris-Nice in the spring of 2003, the UCI mandated for the 2003 season (starting with the Giro) that all races would require the use of helmets in all stages with no exceptions to the rule.
In 2005 the UCI and all member national cycling associations mandated certified helmet usage for all stages. This included TT helmets which had to meet the same regulations.
In the pro peloton with the significant amount of money being payed by helmet manufacturers and sponsors that nearly every team has (often in conjunction with other accessories), most teams have had internal helmet requirements since the late 1990s.