Americans of a certain age will recall that when seat belts became available as a common extra-cost option, but shortly before the government made them mandatory on new cars (around 1964), the U.S. Ad Council heavily promoted a public-service advertising campaign urging automobile drivers and passengers to buy and use seat belts. The name of the campaign was "Buckle Up for Safety," and the main TV advertisement featured a jingle of the same name that ended with the exhortation, "Buckle up!" I hadn't seen this ad in 50 years when I looked it up just now, but I still remembered parts of the jingle word for word. That ad, I think, is the source of "Buckle up!" as a catch-phrase.
Prior to the "Buckle Up for Safety" ad campaign, the more common seat belt expression/warning was simply "Fasten your seat belts"—typically issued as an instruction by stewardesses at the beginning of airline flights, and made famous by Bette Davis's line in All About Eve (1950), "Fasten your seat belts; it's going to be a bumpy night!" (The airline instruction sometimes cautioned about "a bumpy flight"—not "a bumpy night."
In answer to Yoichi Oishi's specific question, "What does 'Buckle up' here [in the context of the news headline 'Buckle up: As Mueller probe enters second year, Trump and allies go on war footing'] exactly mean?" I second Louise's sensible view that it means readers of the headline should prepare for a bumpy metaphorical ride as opponents of the independent Mueller investigation into Russian interference in the 2016 U.S. elections seek to discredit and ultimately halt that investigation. The ride in question is the anticipated (and actually ongoing) series of legal and political maneuvers by the Trump administration and its allies (on the one hand) and by supporters of the investigation (on the other), even as the Mueller team itself maintains strict public silence about its progress, punctuated by occasional bursts of indictments.
In my view, juxtaposing the metaphors of "buckling up" (fastening a seat belt) and "going on a war footing" (marshaling one's forces in preparation for military conflict) isn't especially effective. But that's what the headline writer did. At least the headine doesn't conclude with "Pass the Popcorn."