In today's draft Queens Speech (For non UK people this is a list of laws the government intends to introduce next parliamentary session) Gordon Brown mentioned a transport security bill. It is mainly about airport security but it also puts into UK law an anti piracy/ WMD trafficker international convention and in gives the Royal Navy explicit legal powers under UK law to deal with piracy. Details are here in a pdf. (p49) Or in this story from the BBC

I reproduce the relevant bits below hopefully this will allow the RN to be more forceful in dealing with pirates though I suppose the government still runs the risk of flying pirates back to the UK for trial and then being unable to deport them.

CVFOptimist
Ratifying in UK law the 2005 Protocols to the Convention for
the Suppression of Unlawful Acts Against the Safety of Maritime
Navigation, by creating a number of new offences relating to
committing acts of terrorism at sea, for example:

using a ship to transport weapons of mass destruction or in any
other manner that causes death or serious injury or damage;

using a ship or fixed platform to discharge any explosive, radioactive
material or Biological, Chemical or Nuclear weapon or any other
hazardous substance to cause death or injury; or using any of those
substances against a ship or fixed platform;

sheltering a person who has committed an offence under the
Protocols on board ship.

Permitting enforcement officers (e.g. members of the Royal Navy):

to board and detain ships where there are reasonable grounds to
suspect that the ship or a person on board the ship is involved in an
offence under the Protocols;

to search for and seize evidence and arrest persons suspected of
relevant offences;

to board ships that are suspected of being involved in acts of piracy.