Secondary air is an electrically driven air pump that operates during the first two minutes of starting a cold engine. Right after start up, the computer sends extra fuel to the engine to keep it running while cold. The pump is turned on to inject extra air into the exhaust manifold to burn off the excess fuel. It also heats up the warm up catalytic converter really fast.
This is a two fault DTC (diagnostic trouble code) meaning it has to be detected twice in two consecutive drive cycles to turn on the check engine light (CEL or MIL). What the computer is actually monitoring is the O2 sensor. If the secondary air does not turn on or is blocked from the exhaust, the O2 sensor will read rich.
Since this just started after replacing your head lights and the secondary air pump is usually located behind or just under one of the head lights, I’d say you might have accidentally disconnected the wiring or removed a hose and not put it back. The pump itself is usually not the cause of the problem.