Your company already knows whether you have been taking your meds, getting your teeth cleaned and going for regular medical checkups. Now some employers or their insurance companies are tracking what staffers eat, where they shop and how much weight they are putting on—and taking action to keep them in line.

The goal, say employers, is to lower health-care and insurance costs while also helping workers. Last month, 1,600 employees at four U.S. workplaces, including the City of Houston, strapped on armbands that track exercise...