To "throw the book at someone" means to punish them as severely as possible, applying every possible rule, law, or consequence available, often by charging them with every conceivable offense rather than just the most obvious ones, symbolizing the prosecutor or authority figure using the entire legal code (the "book") against the person.