Good for Wood
A beefy wood bookshelf is prime real estate on which to mount floor-length curtains. Screw a curtain-rod bracket in each upper corner, and hang the rod with one curtain panel for a narrow shelving unit, or two for bookcase spans of 2 feet or wider.
A tieback on one or both sides gives you easy access to the shelves' contents, or simply a changed-up look when desired.
Block to Block
When you're covering a cube-style unit, go for a color-blocked look. Although this is typically seen on walls, using various-colored paints, you can achieve the fabric version by screwing small, discreet eye hooks just inside each cube, near both top edges.
Hem and hang a different color fabric panel in each cube, using elastic cording. As an alternative to eye hooks and cording, use self-sticking hook-and-loop tape.
Rather than assorted colors, opt for a more monochromatic style by using light and mid-tone greens, blues or any color that suits your space. Either way, add a couple of white fabric panels and a color-coordinated patterned panel or two to jazz up the look, if you like.
Mind Your Metals -- or Plastics
For a bookshelf that’s not wood, such as one made from metal or plastic, standard screw-style curtain-rod hardware and fasteners probably won’t do. Use a tension rod so you don't need screws or mounting hardware.
Self-adhesive fasteners, such as hook-and-loop or double-sided tape, come in handy too. If you resort to tape, slightly gather the fabric, so that it hangs well.
For the space that seems visually cold, finding creative ways to add fabrics, such as by covering a bookshelf, provides softness and warmth.
Toppling Trouble or Built-In Bonus
It’s always a good idea to fix tall, heavy objects, such as freestanding bookcases to wall studs, using furniture straps or L brackets. But in a home with children or pets -- who may tug on the fabric or climb on the shelves -- or in areas where earthquakes are common, securing such furnishings to studs is an absolute must-do.
The only type of bookshelf that doesn't need to be secured is one that's built in. If you have a built-in bookshelf, just add a curtain as if it's a window, or kick things up a notch by adding a valance box.