Are employers legally liable if they force their employees to use direct deposit and the system is hacked?
If the employer's system is hacked and the money never reaches your bank, the employer still owes you your salary.
If the bank's system is hacked, it's the bank's obligation to make good your losses; if they can't, I believe that's when FDIC kicks in. (Assuming you're in the US; if not, find out what insurance banks in your country have.)
You're probably better protected via direct deposit than if your employer was giving you a physical check.