I usually build all three early on - just a basic space is enough to start out with, and once I'm properly established, improving them is easy enough. Libraries first, because I like libraries, and fancy tavern infrastructure is more complex.
Temples get outfitted with whatever religious statues the craftdwarves inspiration falls on, but I tend to just go for an interfaith prayer space, rather than individual temples unless I've a sizeable majority worshipping one particular god - no setting up individual shrines for that one god that one dwarf is kinda fond of.
Libraries are fully stocked with sufficient desks and a couple of coffers of scrolls/quires for them to scribble on. I usually set a scholar and a scribe - someone with strong scholar or writing skills but no other useful skills, maybe a medic as well if there's one looking underemployed between bouts of !!Fun!! since that'll usually kick the writing process up a gear.
The tavern/dining room extravaganza with dance floor, mist generator and extensive statuary for that 'ate in a legendary dining room' experience takes a while to develop, but it's fun to put together. I've been tending toward two taverns - a fancy one just for citizens, and a more basic one that allows visitors (who can't hold their liquor) in order to reduce the impact of their fights on my dwarves. Anyone who wants to petition for citizenship has to serve their time listening to poetry in the Slug 'N Spoons.
I've tended to figure (on no evidence) that a fancier experience will fill up their socialising bar faster, and if I've a lot of dwarves socialising rather than working, that's fertile ground for the pressgang.