Wearing bodycams is generally a decision made at a local department by department, or agency by agency basis, as a matter of policy, although there are five states that require them statewide (CA, CT, FL, NV and SC). About half of the states require agencies that use them to have written policies concerning their use but don't necessarily establish what those policies must be:
Nineteen states and the District of Columbia require written policies
in order for law enforcement to use or receive funding for body-worn
cameras. Legislation sets statutory minimum standards for policies,
requires state entities to write or coordinate the development of
policies and charges individual departments with creating their own
policies. Maryland’s law, for example, requires the Police Training
Commission to develop and publish a body-worn camera policy that
addresses when recording is mandatory, when it is prohibited, how to
handle access for review, retention standards for recordings and
consequences for officers who violate the policy or alter recordings.
Texas’ law requires individual departments to have policies that
include a data retention period of at least 90 days, procedures for
officer access to recordings and reporting requirements for
documenting equipment malfunction. The law also prohibits any policy
from requiring that officers film their entire shift. South Carolina
requires departments to submit their policies to the Law Enforcement
Training Council for approval. Utah’s law requires agencies using body
cameras to mandate in their policies that officers wear them while
executing search warrants.
In addition to state laws there are also "invisible" pressures to adopt bodycam policies from insurance providers for law enforcement agencies that increase the premiums of some agencies, especially those with a history of claims that don't adopt better policies.
I am not aware of any such jurisdiction that requires bodycams for undercover officers at it would generally blow their cover unless it is a "wire" type hidden camera used for a particular event to create evidence rather than to document potential misconduct.
A department or agency could make such a policy, but I am not aware of any serious effort to do so.
"Plain clothes" officers aren't necessarily "undercover", however, and I don't know whether there are any bodycam requirements for them. The usual idea is that "Plain clothes" officers are less prone to be in the exigent, confusing, physical situations for which bodycams were seen as a solution, and a non-undercover Plain clothes officer might still have a service provided vehicle with a dash-cam.
One survey of body cam policies of a semi-representative sample of agencies that I've seen doesn't address this particular issue, and many agencies aren't even very clear about when an officer has to record (including Denver, where I live).
Even if a law enforcement agency does have a policy, the fact that the officers didn't follow it is usually just something that can be mentioned by defense counsel in a criminal defense case (through an appropriate witness), and this doesn't always confer affirmative legal rights upon people who deal with policy (public access rights to bodycam footage varies greatly).
The vast majority of law enforcement policies in the U.S. are made at the law enforcement agency level, by an elected official or legislative body (e.g. an elected sheriff, a mayor, or a city council), by a political appointee (e.g. a police chief appointed by the mayor, or a city manager), by a board of political appointees (such as a public university board of regents) appointed by one or more elected officials, or in some state and federal law enforcement agencies, by a senior civil servant who is not politically appointed (e.g. the director of the U.S. Navy's criminal investigation service, NCIS, that spawned a long running police procedural television show).
The United States has the most decentralized law enforcement system in the world. There are something like 10,000 local law enforcement agencies in the U.S. (employing something like 90% of all law enforcement officers), there are several hundred independent law enforcement agencies within the federal government, and there are dozens of independent law enforcement agencies within most state governments. Even within a single U.S. county (of which there are about 3,000 in the U.S.) there would usually be several completely independent local government law enforcement agencies with their own policies on a variety of issues including bodycams.
For example, in Adams County, Colorado (one of sixty-four counties in the State), the elected sheriff establishes one set of policies for his or her deputies (sworn investigator for the elected county coroner could in principle have separate policies as it is a separate independent law enforcement agency). The municipal governments of the cities of Arvada, Aurora, Brighton, Commerce City, Federal Heights, Northglenn, Thornton, and Westminster and the Towns of Bennett and Lochbuie, each have police departments lead by a police chief responsible to the city or town council and a mayor or city manager that sets its own policies. The Regional Transportation District that serves the county with bus and local passenger rails service has its own law enforcement agency with its own policies. Some of the larger school districts have "resource officers" or security departments that have sworn law enforcement officers with their own policies. And, some other special districts might also have their own law enforcement agencies (e.g. a community college, or library district, or water district with a security department that has sworn law enforcement officers).
Each of these agencies adopts its own bodycam policies subject to very lax state policies (or federal policies in the case of federal law enforcement agencies) that provide bare outlines of the kinds of policies that are permissible or not (to the extent that there are any state policies on the topic at all). Usually, even state governments, which have constitutional carte blanc to regulated local government law enforcement agencies, in practice, have only very limited influence over local government law enforcement agencies policies.