Sacrebleu is a very old French profanity meant as a cry of surprise or happiness.
The expression today is not used in the major French-speaking countries France, Belgium, or Switzerland, but in the English-speaking world it is well known from Agatha Christie's books about the fictional Belgian detective Hercule Poirot.
Most French dictionaries state "sacrebleu" to be equivalent to "sacredieu".
Some cultures, notably Francophone Quebec, Canada, commonly use the term "sacrément", or the shortened version "sac" to be a minor expletive. In American English it would be equivalent to saying "oh my gosh" rather than "oh my God" 
The phrase originated from the swear words "sacré dieu". At varying points in history this was considered to be taking God's name in vain which is forbidden in the Ten Commandments. It was then changed to 'bleu' which rhymes with Dieu. It is sometimes incorrectly referenced as referring to the color associated with the Virgin Mary.
Historically, blue was one of the colors reserved for royalty. As Mary is referred to as the Queen of heaven, blue began to be associated with her. (actually, in iconography, blue is a color associated with humanity, which is why Mary is shown to wear blue in many works of art)
Other sources propose it coming from old blasphemous curses relating to God, used from the late Middle-Age (some are attested as early as the 11th century) to the 14th (at the latest), with many variants: morbleu or mordieu, corbleu, palsambleu, jarnidieu, tudieu, respectively standing for mort [de] Dieu (God's death), corps [de] Dieu (God's body), par le sang [de] Dieu (by God's blood, the two latter possibly referring to the Eucharistic bread and wine), je renie Dieu (I deny God), tue Dieu (kill God)... Those curses may be compared to the archaic English [God']sdeath, sblood, struth or zounds (God's wounds). They were considered so offensive that Dieu was sublimated into the similar-sounding neutral syllable bleu. The verb sacrer has several meanings, including to crown, to anoint, to name someone [champion, best actor, etc.], and in the past, rarely in France but more common in French Canada, of swear, curse. Therefore, sacrebleu could be in modern French Je jure par Dieu and in English I curse by God, or the more used I swear to God.
- SACREBLEU : Etymologie de SACREBLEU
- Étymol. et Hist. 1. 1552 Sacre Dieu (Rabelais, Quart Livre, chap. 47, éd. R. Marichal, p. 268), attest. isolée; à nouv. au xixes. 1828-29 sacredieu (Vidocq, Mém., t. 3, p. 160); 2. 1642 par la sacre-bleu! (G. Brunet, Le Nouv. siècle de Louis XIV, 8 ds Quem. DDL t. 19); 1745 sacrebleu (Godard d'Aucour, L'Académie militaire, I, 49, ibid.). I comp. de sacre3* et Dieu; 2 altér. p. euphém. de sacredieu; cf. 1757 par la sacredié! (J.-J. Vadé, Œuvres posth., p. 254) et 1750 sacrelote! (Id., Le Paquet de mouchoirs, p. 44).
- Tassie, J. S (1961).” The Use of Sacrilege in the Speech of French Canada”, American Speech, 36.1
- Dictionnaire étymologique, éditions France Loisirs Librairie Larousse 1971