From Bilbo's departure in The Hobbit, it follows that going on a trip without a hat was unusual. Hats were commonplace in the Shire: for example, when Pippin and Merry returned to the Shire as small giants, they were asked about their hat sizes.
However, I don't remember the novel ever referring to the hats that Hobbits should wear during their adventure.
I have searched my copies for the words "hat" and "hats", and never are the Hobbits mentioned to be wearing hats during the events of the Lord of the Rings.1 As such, it seems unclear whether or not they were wearing or weren't wearing hats.
NB: This does not mean that Hobbits, in their daily lives did not wear hats, such as the Shirrifs pointed out by Valorum.
There are two characters in the Lord of the Rings that wear hats. Namely, Gandalf and Tom Bombadillo.
There was another burst of song, and then suddenly, hopping and dancing along the path, there appeared above the reeds an old battered hat with a tall crown and a long blue feather stuck in the band.
Book 1, Chapter VI: The Old Forest
Arrows fell among them. One struck Frodo and sprang back. Another pierced Gandalf ’s hat and stuck there like a black feather.
Book 2, Chapter V: The Bridge Of Khazad-Dûm
Gandalf's hat is mentioned a few more times in The Two Towers, with no mention of hats in the Return of the King, before the chapter Many Partings.
The only mention of Hobbits and hats are the following three:
'Don’t let your heads get too big for your hats! But if you don’t finish growing up soon, you are going to find hats and clothes expensive.’
Book 6, Chapter VI: Many Partings
He opened an eye and tried gallantly to smile. ‘Who’s this young giant with the loud voice?’ he whispered. ‘Not little Pippin! What’s your size in hats now?’
Book 6, Chapter IX: The Grey Havens
In Three is Company, before Pippin, Frodo and Sam set out for Frodo's new home, Sam appears with a "tall shapeless felt bag" on his head, which he calls a "hat". This is quite an interesting point, given the difference in status between the other two adventurers, Pippin and Frodo, and Sam. Sam is a lower class, more simple Hobbit. Gardener for Frodo, Sam may have chucked on the felt bag to feel more akin with his fellow travellers, who would have normally been seen with a cap of some kind.
Similarly, in the History of the Lord of the Rings, apart from the earliest works, the story talks of no mention of hats being worn by the Hobbits in the Fellowship. Although there is a very early version of the tale, where Frodo wears the Ring to escape from Maggot, and in the process temporarily steals Farmer Maggots hat.
Bar this, there is no mention of the Hobbits adventuring with a hat.
Some pictorial evidence from renowned Tolkien artists Alan Lee and John Howe, which may help shape viewpoints, show that the Hobbits likely were not wearing hats during their adventures:
More examples can be found below:
1 Did you search your copies for homburg, fedora, bycocket or bicoket, bicorne or tricorne, chapeau, bonnet, beret, biretta, boater (I just know there was a straw boater in Bored of the Rings), bowler, capotain, caubeen, cloche, deerstalker, fez, gatsby, hardee, kofia, porkpie, shako, slouch, taqiyah, toque, trilby, vueltiao, or any other of the numerous kinds of hats that do not bear 'hat' in their name? ;)
Comment by @Lexible
Based on this comment by @Lexible, stating my search terms were far too limited, I dove deeper, my results are below:
Homburg, Fedora, Bycocket, Bicoket, Bi/Tricorne, Chapeau, Bonnet, Beret, Biretta, Boater, Bowler, Capotain, Caubeen, Cloche, Deerstalker, Fez, Gatsby, Hardee, Kofia, Porkpie, Shako, Slouch, Taqiyah, Toque, Trilby, Vuelito: 0
As Edlothiad had shown, there is no positive evidence that they wore hats.
I think that the fact that hats are not mentioned where it would be most logical to mention them makes it very probable that they were not there.
For example during the fight in Chamber of Mazarbul Sam recieves a light head wound from an orc blow. Would he had a hat on, somone (himself and narrator included) would remark on the damage to it. And when he splashed into the Anduin at Tol Brandir, it would float away.
Also they never use hats to wave for attention, nor are they lifted in greeting.
In conclusion, it seems plain to me that hats are usually worn by Hobbits while working outdoors, taking trips and walks in the Shire or participating on outdoor social events, but Frodo and his companions left them intentionally behind, knowing that these items would be a hindrance on the journey, and would soon be lost or destroyed. They probably used hooded cloaks instead.