If the owners of a company are planning to sell it off, should employees worry about the owners laying them off to prevent the remainder of their restricted stock units from vesting?
Depending on your local laws, such a layoff may be an unlawful act. If the whole purpose of the lay-off is to strip the employees of their RSU's, the employer may be liable and get sued.
However, you have to check that with a lawyer licensed in your jurisdiction. In many places there are no laws against this. In any case, you may claim that there was no good faith/just cause in the action and still sue the employer.
Mere threat of a lawsuit may thwart the whole deal, so I suggest the employees to lawyer up and talk to the employer. That, by the way, will require to create a union - a representative body for the employees. In some places that by itself may be a just cause for termination (in some extremely anti-union jurisdictions, I would guess if there were some they would be in the US).
Bottom line - talk to a lawyer.
As littleadv says it depends on the local laws.
Normally one shouldn't be too worried. Typically the stocks given to the employees are a very small portion of the overall stocks ... the owners would not try to jeopardize the deal just so that they make an incrementally small amount of money ... they would rather play safe than get into such a practice.