Step 1: Encapsulated bacteria (Streptococcus pneumoniae, Haemophilus influenzae) are protected by a polysaccharide capsule. Defence against them requires antibodies directed at this polysaccharide.
Step 2: Anti-polysaccharide antibody responses are mediated predominantly by the IgG2 subclass. So a deficiency of IgG2 impairs opsonization of capsular organisms.
Step 3: This is why selective IgG2 deficiency presents as recurrent, chronic infections with encapsulated bacteria, especially of the respiratory tract.
Step 4: IgG1 and IgG3 mainly target protein antigens and IgG4 is associated with chronic antigen exposure and allergy, so they do not explain susceptibility to capsulated bacteria. The answer is IgG2.