When it's cold, you definitely want something over your ears. It doesn't take much fabric to keep them warm. You'll want to choose a hat that is thin so that it fits comfortably underneath your helmet. Knit hats are probably too thick to be comfortable under you helmet.
For years I used this cheap hat that I found at Academy. It was definitely under $10, maybe even $5. It is thin and warm enough on my ears. It's a little dorky, but I'm okay with that. If it would have been big enough to come down just a little further over my ears, I'd still be using it.
This season I bought the Bontrager Thermal Cycling cap. It covers my ears better and comes down a little further on my neck. It's just about the same thickness as the cap I got at Academy, so it fits great under my helmet. The brim is nice for wet days. Instead of running down your face, the water drips down past you glasses. At $25 it's quite a bit more expensive than my academy hat, but the better fit paired with a classic look is worth it in my opinion. I'd buy this again in a heartbeat.
When the windchill is below about 25, I prefer to have my face covered. I have a castelli balaclava. It's warm and fits well under my helmet. I've had it for years, so I'd say it's high quality; however, I wouldn't buy this particular balaclava again. I would get one that has a hinge around the jaw line. When I get hot in the castelli balaclava, I can sort of pull the face hole down under my chin, but it doesn't seem like it was designed to stretch like that. Nike and Under Armour make some that are designed so that they can cover your mouth, be pulled below your chin, or they can even be worn as a neck gator. I dig functionality, so I obviously really like the fact that these balaclavas are really 3 pieces for the price of one. My castelli shows absolutely zero sign of wear, so I'll probably hang onto it for while longer before I upgrade.
For the ultra-cheap bike racer, the sleeve of an old tshirt works great as an ear cover. Just cut it off right before the seem. On the dork meter, it's definitely near the top, but it works. I've done this at a couple races where the temps are colder than predicted. If you're at a race and realize you forgot your hat, just go to walmart (or even a dollar store) and buy the cheapest large or xl (depending on the size of your head) t-shirt and make your own hat. You'll have warm ears on race day.
I modeled each of these caps on square tupperware...I wasn't willing to do hat selfies. Sorry. Obviously this skews the look of each hat quite a bit. Just trust me that they all work, but the Bontrager Cap looks much better than the other 2.
And here is the balaclava that I probably wouldn't buy again.