UN Security Council Resolution 1816 is a very odd creature, authorising pursuit of pirates into Somalia's territorial waters - where Somalia (or at least the internationally recognised, if ineffectual, Transitional Federal Government) consents.
This is an authority the TFG could give under international law, with or without a UNSCR. Thus, Resolution 1816 is largely pointless. Nonetheless, this is the first formal report I've caught on an agreement stuck between the TFG and a foreign navy under the Resolution (which expires next month anyway).
India has already shown it's prepared to use lethal force against pirates. In that case it appears to have been self-defence or returning fire. This would clearly be legal, though a shoot-on-sight policy towards pirates would not.
Pirates may be nasty characters but generally they are little more than common criminals who - while hostage-takers - are not interested in endangering life unnecessarily. (What use is a dead hostage?) We are not at war with pirates, and most legal systems don't authorise shoot-to-kill policies in the course of general law enforcement. That said, such an approach might well not generate much protest.
I doubt, however, it would be much of a deterrent. So long as Somalia remains in chaos and easy pickings are available in the Gulf of Aden, piracy will continue regardless of the risks to the pirates themselves.