Whether you build knoghts or longbows, or any other unit, of course, depends on the circumstances.
If you are in a situation where you wish to launch a war, and you can do so in your own time at your own convenience, then it is likely you will go for the best units you can, and knights are the granddaddys of the early middle ages; great attack, great defence, mobile. Build a stack and watch your enemies crumble.
In other situations, you may find your opponents aclling the shots and attacking you out of the blue. Perhaps then, you simply can't wait for 70 shields to accumulate, and you build longbows at 40 shields each instead, because you need some quick response.
In PTW with the addition of medieval infantry, you might as well go for those at 40 shields if you have iron, because they are also defence 2.
By far the greatest feature of longbowmen is that they are an attack 4 unit that require no resources. In an emperor level solo game I'm currently playing, I learned to appreciate their value. The game settings were totally random, but on a standard sized map. I drew the Germans, and the map turned out to be a 60% pangaea. I got a decent landgrab, on the northern edge of the pangaea, but was still weak. And I had no iron or saltpeter, and no hope of trading for it
The civs next to me were Babylon and China, who both had all the required resources. To have a good chance of winning the game I had to attack at some point, and eventualy I've managed to knock both of them out, learning a great deal about longbows and combined arms in the process. When I fought Babylon, they were using swords, bowmen, spears, pikes and medieval infantry (this was before chivalry) - at that point, i was fighting with archers, spears and horsemen. The main war against China, they had Riders (and a GA
), muskets, medieval infantry anmd cavalry (!), I had spears, horses and longbows, yet I whipped them, by using longbows covered by spears and advancing on high ground, and large stacks of horses to take cities down by force of numbers. I was amazed at how well longbows did against muskets in size 12 cities, and even how good horses were against cavalry (because the cavalry couldn't retreat, so using a longbow to injure the cavalry and get him to retreat, and then use a horse to finish off).
Conclusion: all units are useful in the right circumstances, and a good general uses whatever he can get his hands on!