and you should be able to answer your own question.
1. Somalian pirates are individuals. They act for themselves, and do it for money. Nobody in our government or armed forces has the faintest idea who the pirates are.
2. The men who were sailing off Iran were captured by the Iranian Navy, with the full knowledge and consent of the Iranian government. It's a serious matter, and not just for the men involved. We know who we're dealing with. One country's government boarded a vessel on the sea and made captives of the crew.
The two incidents have little in common,apart from the fact that boats were involved, and have nothing whatever to do with double standards on the part of our government.
Glad they've been released, but if you are going to go tooling around near Iranian (or Somali, or North Korean etc) waters you really should not be surprised if you get taken because of the vagaries if wind and tide, and you should not expect the Foreign Office to bail you out.
For a period of four years I was warned that it would be dangerous for me to go within 50k of a certain border as I might get snatched.