"Once upon a time" is a stock phrase used to introduce a narrative of past events, typically in fairy tales and folk tales. It has been used in some form since at least 1380 (according to the Oxford English Dictionary) in storytelling in the English language and has opened many oral narratives since 1600. These stories often then end with "and they all lived happily ever after", or, originally, "happily until their deaths".
The phrase is particularly common in fairy tales for younger children, where it is almost always the opening line of a tale. It was commonly used in the original translations of the stories of Charles Perrault as a translation for the French "il était une fois", of Hans Christian Andersen as a translation for the Danish "der var engang", (literally "there was once"), the Brothers Grimm as a translation for the German "es war einmal" (literally "it was once") and Joseph Jacobs in English translations and fairy tales.
The phrase is also frequently used in such oral stories as retellings of myths, fables, folklore and children's literature.
That explanation is pretty much all-inclusive, so it would seem senseless for me adding anything else to it ....
My first recollection of the phrase is in the form of my mother reading "fairy tales" to me as a small child. There were many among my favorites, including, "Rapunzel," which was among those collected by the Brothers Grimm and published in 1812, and, "The Princess and the Pea," written by Hans Christian Anderson and published in 1835. I am no longer sure what appealed to me about Rapunzel in the tower and her long hair, but I sort of assume I identified with the princess and her physical sensitivity.
As for the music
Final verse of the song
"Once Upon a Time"
But, somehow, once upon a time never comes again
Not long ago, I ran across a song entitled, "Once Upon a Time." Charles Strouse composed the melody and Lee Adams wrote the lyrics for the song, which was among the numbers in a 1962 Broadway musical play, "All American." As for the song, it might not fall into the category of "classic rock," but, all the same, I love it and I decided to include it here.
A week from today is Valentine's Day and since it is doubtful I will post again between now and then, I will dedicate this song to Saint Valentine .... and to Geoffrey Chaucer, who in his poem, "Parlement of Foules," was the first to associate the day with romantic love .... and to all the young ladies who gave me a Valentine's Day card way, way back in elementary school.