"When was this book written?"
Translation:Kiedy została napisana ta książka?
It's quite different grammatically, but perfectly correct.
Generally, you can't leave out "została", because then you arrive at "Kiedy ta książka napisana" which would be like "When this book written".
"Kiedy napisano tę książkę" uses a completely impersonal form, so there is no real subject, but it's quite a common construction. It just works like "When X happened"... only that X is not the subject.
honestly? If i had three translations to choose: "kiedy została napisana ta książka", "kiedy ta książka została napisana", and "kiedy została ta książka napisana" the last translation would be the third one :) I don't say that this is gramatically incorrect, or this translation shouldn't be accepted, but ... (of course everything before "but" is irrelevant as Tyrion Lanister said xD) ... but the third option is the least natural :)