Theymos' entry is incomplete, so I extended it. There's another situation in which it's safe to delete transaction data: if you can prove it'll never be used. The transactions that embedded flags, ASCII Bernanke etc could be deleted without risk because the chances of finding a private key that hashes to a line of English text is extremely remote. What's more, transactions with non-random looking hashes or pubkeys can be automatically identified.
This is true, but with a major caveat: the only way to prove to someone else that the transaction data is safe to delete is to give them a copy of it, which means you need to have a copy of it. Without the ability to prove this, newcomers have to trust they aren't being lied to. I think this may open up a potential double-spending attack or possibly worse; while the nodes that had a copy of the expunged data at some point can safely mark the correct transaction outputs as spent no-one else can confirm what it spent.
(Also, if someone manages to get non-standard scripts into blocks, they can create transactions that are spendable but require you to keep a copy of arbitrary data in order to be able to validate future transactions that spend them.)
Data can also be included in tx input scripts. However data blocks there don't have any effect on anything, ie, with the right database structure you can record the original hash of the transaction, then delete the unneeded data blocks if they have no effect on the connected output script.
Of course, as I understand it the transaction ID is computed as the hash of the transaction, so you can no longer prove that the transaction in question has the ID you claim it has, that the block that contains it or any blocks building on that block are valid, or even that the block that contains it does actually contain it rather than some other transaction you want to maliciously replace.
If you encrypt the data before putting it into the block chain, the bad transactions probably can't be reliably identified. However they also shouldn't pose any legal threats to the miners. If the key is publically revealed, the same as above applies - the outputs can be removed without risk.
Which again pretty much requires some kind of trusted central censorship body, with all the transparency problems that entails. At the very least they could maliciously render particular bitcoins unspendable, which means that someone could get a court injunction forcing them to do so.