Catalysis of the reaction: CoA + substrate-serine = adenosine 3',5'-bisphosphate + substrate-serine-4'-phosphopantetheine. The transfer of the 4'-phosphopantetheine (Ppant) co-factor from coenzyme A to the hydroxyl side chain of the serine residue of acyl- or peptidyl-carrier protein (ACP or PCP) to convert them from the apo to the holo form.