Concept:
Dye selection is based on the chemical compatibility between the dye molecule and the functional groups present in the fiber.
Step 1: Understanding Protein Fibers.
Wool and Silk are natural protein fibers. They contain amino ($-NH_2$) and carboxyl ($-COOH$) groups. In an acidic dye bath, the amino groups become positively charged ($-NH_3^+$).
Step 2: Ionic Bonding with Acid Dyes.
Acid dyes are anionic (negatively charged) in solution. Because of the opposite charges, a strong ionic bond is formed between the negatively charged dye and the positively charged protein fiber. This is why acid dyes have an excellent affinity for wool and silk but very poor affinity for cellulosic fibers like cotton or jute.