Here’s a bit more context from chapter 6:
He [Frodo] turned round and listened, and soon there could be no doubt: someone was singing a song; a deep glad voice was singing carelessly and happily, but it was singing nonsense:
Hey dol! merry dol! ring a dong dillo!
Ring a dong! hop along! fal lal the willow!
Tom Bom, jolly Tom, Tom Bombadillo!
Half hopeful and half afraid of some new danger, Frodo and Sam now both stood still. Suddenly out of a long string of nonsense-words (or so they seemed) the voice rose up loud and clear and burst into this song:
Hey! Come merry dol! derry dol! My darling!
Light goes the weather-wind and the feathered starling.
The narration says that Bombadil is singing “carelessly and happily” and that the song consists of “a long string of nonsense-words”. The impression we get is that Bombadil simply loves to sing as he goes about his activities. His song expresses his joy in the natural world about him (the starlings and willows, the wind and sun and starlight and so on), and declares his love for Goldberry. When Frodo meets Goldberry he says,
“Fair lady Goldberry! Now the joy that was hidden in the songs we heard is made plain to
me.”
We can imagine that Bombadill makes up his song as he goes along, using a stock of phrases that he has composed over the years, and that sometimes he runs out of sense and fills up the tune with nonsense-words. However, these words are not completely nonsensical, and in fact most of them can be explained.
“Hey” is “an exclamation expressing exultation, incitement, surprise, etc.” (OED) In Bombadil’s song it seems to express his joy. The OED goes on to add that it is “sometimes used in the burden of a song with no definite meaning”, for example in Balthazar’s song from Shakespeare’s Much Ado About Nothing:
Converting all your sounds of woe
Into Hey nonny, nonny.
“Derry” is “a meaningless word in the refrains of popular songs” (OED), for example the folk ballad ‘The Three Ravens’:
There were three ravens sat on a tree,
They were as black as they might be.
With a down, derry, derry, derry, down, down.
“Dol”, “fal” and “lal” are solfège, that is, conventional syllables that are assigned to notes of the musical scale: the usual spellings are “do re mi fa sol la”. These come from the initial syllables of the phrases of an 8th century Latin hymn Ut queant laxis which was set to a rising scale:
Ut queant laxīs resonāre fībrīs
Mīra gestōrum famulī tuōrum,
Solve pollūtī labiī reātum,
Sancte Iōhannēs.
(The syllable “ut” was found to be hard to pronounce and was substituted by “do” in the 17th century.)
The syllables “fa” and “la” are popular fill-in words in English songs: indeed, a common form of song has a refrain consisting only of these words. Well-known examples are the madrigal ‘Now is the month of Maying’ by Thomas Morley:
Now is the month of maying,
When merry lads are playing,
Fa la la la la la la la la,
Fa la la la la la la la.
And the carol “Deck the halls”:
Deck the halls with boughs of holly,
Fa la la la la, la la la la.
“Ring a dong” is onomatopeia for the sound of bells, and similar words are a common motif in English nursery rhymes (“Ding dong bell / pussy’s in the well”) and carols (“Ding dong! Merrily on high”).
“Dillo” is an abbreviation of “Bombadillo”, which is just “Bombadil, O”, the “O” being “Added after the rhyme word at the end of a line in a ballad, song, etc., for metrical reasons” (OED), as for example in the folk song ‘Green grow the rushes, O’:
I'll sing you one, O
Green grow the rushes, O
What is your one, O?
So the effect of these nonsense words and phrases is to strongly associate Bombadil’s song with the tradition of English folk songs and ballads, fitting Bombadil’s role as a kind of archetype or spirit of the English countryside.