Right-click a shortcut in Windows 7, click "Pin to taskbar" and it'll be copied to the taskbar, for easier access in future: great.
Right click a folder, though - or a file, a library, a Control Panel applet and more - and you'll find no such option. There are various manual workarounds you can try, but an easier solution is just to use TaskbarPinner, which allows you to pin just about anything you like.
The program arrives as a tiny download (236KB), just unzip this and launch the right file for you (even at this size, there are both 32 and 64-bit versions included).
The TaskbarPinner interface looks very much like a regular Windows 7 dialog, and it's very straightforward. You have four options - "Pin a File", "Pin a Folder", "Pin a Shell Location" and "Pin a Library" - and all you have to do is click one, choose whatever it is you'd like to pin, and you're done. (As usual, right-click and select "Unpin..." to remove anything later.)
Probably the most interesting option here is "Pin a Shell Location", as this gives you access to all kinds of system features (not just your own folders). So you can pin Control Panel applets, Windows Help, the Recycle Bin, Windows Search, the Run box and more.
And if you really like the program, then checking the "Explorer context menu" allows you to access it from Explorer, or the desktop. To pin a file, folder or drive to the taskbar, say, you'd just right-click them, select "Pin with Taskbar" and it'll be added right away.