It is illegal
By unilaterally annexing the West Bank, Israel would be violating international law, and might suffer punitive consequences.
International law experts, including prominent Israeli experts, are all but unanimous in considering the West Bank to be occupied territory, and in endorsing the view that international law prohibits the acquisition of territory by force, and extending the sovereignty of the occupying state onto that territory (which is the definition of annexation). This principle has been adopted and reiterated in the United Nations charter and in numerous UN resolutions, and affirmed by the International Court of Justice (ICJ). Other countries have violated this principle and suffered severe international consequences, whether military action, diplomatic pressure, or economic sanctions. Indonesia, Morocco, Iraq and Russia are examples. Israel is already facing legal proceedings in the ICJ for violating these laws by establishing settlements in the West Bank. If Israel officially annexes these settlements, it will make the case against it at the ICJ much stronger.
In addition to violating international law, Israel would be violating a binding U.S.-brokered agreement that it has signed with the PLO in 1995, the “Oslo II” agreement, which states (Article 31-7) that “neither side shall initiate or take any step that will change the status of the West Bank and the Gaza Strip pending the outcome of the permanent status negotiations.”