Measure each side of your bookcase and select raw wood quarter round molding in enough length to cover each side of your case. You can cut these down to size at home or have a home improvement associate cut them for you for free. Most stores, however, will not do miter cuts for you. Drill holes about 3 inches apart, using the smallest bit possible, down the center of the rounded face of each trim piece.
Miter saw each trim piece for each edge of the case and use the same angle, usually a 45-degree cut. Position on the floor the four pieces of trim to make sure that the cuts on each end will meet flush.
Lay the trim pieces on a plastic sheet on a table and sand each strip so the wood is smooth. Then stain and finish each piece of trim. If you are painting the trim, make sure your paint is smoothed on with an even layer. Be sure to cover the miter edges too. Let everything sit and dry for about a day before handling again.
Install your first piece of trim at the top and hammer only two finishing nails at either end into the front edge of the bookcase face. Use your carpenter's level to check that your trim is level across the top. This piece is your guide for the two sides. Test one side of the trim by placing it on the bookcase. If everything matches up with the top miter cut, then add wood glue to the case front edge and place the trim on. Do the same for the other side. Carefully add the bottom trim, double-checking that the miter cut edges meet correctly, and let everything dry for an hour.
Hammer in finishing nails on each side and bottom trim, where you drilled your holes. Once done, add in the rest of the finishing nails for the top trim. If your finishing nail holes show, add in a dab of wood putty, let dry, then finish over the putty with a dab of stain or paint, using a toothpick. If you have stationary shelves, you can add trim here too. Don't add trim on adjustable shelves because one shelf placement with its trim may not work right when slotted into another position.