As usual the Categorical Imperative is pretty applicable.
Act only according to that maxim whereby you can, at the same time, will that it should become a universal law. – Immanuel Kant, Fundamental Principles of the Metaphysic of Morals, 1785
Every single time you do anything - breathing, eating, killing, hacking computers, whatever - it can only be ethical action if it would be morally and practically defensible for every single sentient being in existence to be forced to behave the same way when faced with the same situation. Don’t think of the word forced here meaning government thugs with guns pointed at your head, think rather that any other action would be prevented by the nature of the universe itself.
So it’s only OK for you to break into someone else’s computer and delete their files if it’s OK for everyone in the world to do it. And that means everyone, not anyone. Stealing instead of working is indefensible because if we all stole instead of working we’d face mass starvation; lying instead of telling the truth is indefensible in the majority of situations because if we all lied all the time we’d be unable to communicate & massive unnecessary suffering and privation &etc.