A fine question. To play the best joke, you really need to work at a library or know someone who does. One excellent gag is to find someone who works at the library and has a teenage daughter, pull up the daughter's record, and reserve a half-dozen books on subjects like teen pregnancy, what to expect when you're expecting, and a book of what to name your newborn child. When the books arrive, show them to co-workers and spread nasty rumors. At the end of the day, tell the person that their daughter's books have arrived. Wait a day before you tell them it was a joke.
If that's too mean, here's another good one: Most databases allow you to insert a note field in the patron's record where you can write messages to alert other workers if a patron was rude to you, lied to you, smelled like urine, etc. The purpose of this field is to keep track of a patron who isn't paying fines or has some sort of other repeating offense, but that doesn't mean you can't have a little fun with it. So, find a loyal friend who has a library card and put a note in his account that says something like, "If patron is wearing a red T-shirt and a Disney hat, he may try to kill you. If he asks you how many books he can check out, he is about to go crazy. Alert police immediately." Give your friend a red shirt and a Disney hat, tell him to go into the library, check out a book, and ask how many books he can check out. When the police arrive, tell him it was just a joke.
Other fun jokes I just made up include sticking a security strip inside someone's coat, and telling someone the Dewey Decimal system is being by shelving according to height. Heh. Me so funny. If only I had friends to appreciate my funny...