The Polygraph Protection Act limited the use of polygraphs but mostly for mainstream employers who were using them to screen potential employees or to find out if their employees were stealing.
In a few types of jobs polygraphs are still legal. Law enforcement and pharmacies come to mind.
If your job requires a clearance, it may be necessary also.