I know that Hacking is illegal in any country. my question is this "is it illegal to hack enemy country website ?" e.g i lived in Pakistan, let say i hacked Indian Govt websites. is this illegal ? if this is illegal what will be fine and prison charge?
This question really depends on the specific countries involved, as all law depends on jurisdiction. However, there are essentially two ways that breaking into foreign computer systems could be illegal: 1) Your own country has laws against hacking that include hacking into foreign computers or 2) The country you're breaking into has laws about hacking that are not limited to citizens.
In the first case, your own country would find such "hacking" illegal; in the second, your target country would find such "hacking" illegal. If you violate the first, which is the less likely option, you could be traced, located and prosecuted by your own country. If you violate the second, which is the more likely option, the target country would target you for extradition and prosecution. Depending on the amount of political power your target country has, this could result in you being shipped off to another country to face their courts, without the protection of your own country.
In other words, it could very well be illegal, though the specific sentence resulting from such a crime is far too specific to even attempt to address in the general case.