I’ve got lights for both my bar and helmet. While “both” is the real answer to the question, it becomes a bit more subtle if you can have only one. For climbing, I prefer the light on the bar, mostly because it’s easier to have a lower-powered light on the bar, since you’re always pointing it relatively close in front of you, and for a consistent low power to not be a problem.
For riding at any sort of speed on singletrack, though, the helmet is the only way to go. As you turn a corner, you’re likely to be looking deep into the turn—deeper than the turn of your bars. In some cases, you’ll be countersteering your light into someplace else altogether. Having the light track where you’re looking is the best answer if there’s only one light to be had, in my opinion.
Update September 6, 2018: Last evening, I happened to go on the first ride in months that required me to use a light. I had both helmet and bar lights with me, but they were in my pack, not mounted. The bar light was easiest to throw on to finish the ride, and it wasn’t yet completely dark, so I put just that one on. (I had the linked article in mind as I made this decision.) The other person I was riding with also—uncharacteristically—used only a bar light.
It got us to the end of the ride, which is a singletrack downhill, but I can say with even more certainty that this is easily the worst of the three choices proposed by the article. My riding partner commented unprompted on how much harder it was to ride with just a bar light. When I told her about the article, she agreed it’s wrong.