It is basically voluntary, however OSHA considers NFPA 70E a "consensus" standard and does refer to it when evaluating safety plans and hazard assessment. Under the OSHA "general duty" clause, they can refer to a consensus standard such as 70E as a publicly-available document that represents industry standard practices.