Jean-Jacques Rosseau published his autobiography called "Confessions" in which he writes: "Finally I recalled the stopgap solution of a great princess who was told that the peasants had no bread, and who responded: Let them eat brioche (a form of cake)". However, despite that this book was published in 1782 it was written in 1765 when Marie Antoinette was just ten years old and still living in Vienna. But when referring to "Confessions" you have to consider that his autobiography was in large parts unreliable which makes it possible that he invented the incident. The great princess in question was most likely Marie-Thérèse.
A different version of the quote was uttered by Marie-Thérèse who married Louis XIV in 1660 when she suggested that the French people could eat "the crust of the pâté" (la crôute de pâté). The royal family itself believed that the statement was from Marie-Thérèse - Louis XVIII attributed to her when he wrote his memoirs in 1791. The Mesdames Victoire and Sophie have also been accused of saying this.
During the French revolution the hatred of the Queen grew to unparalleled heights which meant that several false rumours about the Queen and her behaviour started circulating - and the French people was ready to believe it. Even today you can hardly say the doomed Queen's name without hearing this phrase so the effects of the French revolution still taints the memory of Marie Antoinette. The very personality of the Queen combined with her previous statements it seems highly unlikely that she had anything to do with the phrase. Earlier in her life she had written to her mother:
It is quite certain that in seeing the people who treat us so well despite their own misfortune, we are more obliged than ever to work hard for their happiness.This does not seem to fit very well with a stupid and selfish princess. As stated, it is not even certain that the phrase was actually ever uttered by anyone - except for Rousseau's imagination. As Antonia Fraser puts it in her praised biography of Marie Antoinette: "It was a callous and ignorant statement and she, Marie Antoinette, was neither."