While any medical professional would tell a motorcycle rider to put on a helmet, bicycle helmets have a fuzzier mandate.
When it comes to wearing a helmet on a bicycle, a lot has to do with your own perceived perceptions of risk. According to Bicycling.com, it is true that the odds of a fatal accident go down when cyclists wear helmets, but helmets do not eliminate all risk.
The reason why helmets do prevent some bicycling injuries is because they prevent a modicum of direct injury. If you fall off a bicycle and your head hits a rock, you are more likely to sustain injury if you are not wearing a helmet.
Modern bicycle helmet design, in other words, does prevent fractures. However, it is notable that bicycle helmets do very little to prevent concussion. However, concussions are a serious problem in competitive cycling: you are more likely to suffer a concussion cycling then you are playing any other sport, including American football.
Notably, a 2016 study comparing 8 countries suggests that while American cyclists have among the highest self-reported helmet uptake rates, they also had the highest fatality rates per distance cycled. Curiously, the Netherlands, which has very developed bicycle infrastructure and large numbers of cyclists, reported the lowest uptake numbers concerning helmet-wearing and also the lowest fatality rates.
A lack of infrastructure is responsible for many American cyclist deaths. So while wearing a helmet is not a bad idea, it is unlikely that if you are in a severe accident it will protect you 100%.