France uses the same colors in their flag but refer to it as the "blue, white, red"
The earliest printed use of the phrase known to the OED is in the New York Daily Times, 3 August 1853, page 2 col. 1, reporting on a celebration at Plymouth (ProQuest link):
The Samoset house was covered with banners and festoons of 'the red, white and blue'.
That is followed by the Allen County [Ohio] Democrat, 17 May 1856, page 1 col. 4, quoting the song "O Columbia, the Gem of the Ocean", a.k.a. "The Red, White and Blue":
Proudly she bore her brave crew, ...Now the boast of the Red, White, and Blue.
The phrase surely owes its widespread popularity to that song. The circumstances of the song's composition are uncertain; Wikipedia alleges (no citation) that the song dates to 1843, for what little that's worth.
I have found an earlier reference, however. The Liberty Star and Union County [Indiana] Banner, 10 September 1836, page 4, gives under the headline "Song for Election Day" a song whose first stanza goes:
Here's a health to him that is just,
Here's a health to him that is true,
And who could not wish success to the man,
Who conquered at Tippecanoe?
It is good to be noble and firm,
It is good to be honest and true,
It is good to support our Harrison's cause,
Who stuck to the "red, white, and blue."
Huzza for the brave and the true,
Who battled at Tippecanoe,
And the heroes whose names on the banks of the Thames,
Were written in "red, white, and blue."
An 1840 collection of Harrison campaign songs calls this song "The Harrison Cause", and states that it is sung to the tune of "Bonnets of Blue". The battle of Tippecanoe was won under Harrison's generalship in 1811; the line about "the Thames" refers to the death of Tecumseh at the Thames river in Ontario, in 1813.
I therefore conclude that the earliest printed appearance of the phrase in reference to the US flag was in Indiana in 1836 as part of Harrison's unsuccessful presidential campaign that year, celebrating his role in the battle of Tippecanoe. Wikipedia claims that Harrison had made a speech at the battlefield in 1835 as part of his campaign. The 1840 song collection would have been for Harrison's next, and successful, presidential campaign.
However, the fact that even in 1836 the phrase appears in quotation marks leads me to suspect that it is a quotation of an already familiar phrase. But I can find no print records of its earlier use.
(The colours on France's flag may appear in the order blue, white, and red, but there are plenty of pre-1836 references to it as "red, white, and blue"; so the phrase itself is older.)
Edit. formatting.