People in permanent Atrial fibrillation can't benefit from a dual chamber pacemaker as the electrical activity in their right atrium is chaotic and therefore cannot be used by the pacing device to determine the rate at which the ventricle is paced. Furthermore, the atrium is not susceptible to being paced by an atrial lead.
People who have paroxysmal atrial fibrillation may benefit from dual chamber pacing if their AF is not particularly frequent and prolonged. In these circumstances the pacemaker can be programmed such that it recognises when the patient goes into AF and changes to a single chamber pacing mode ignoring the fast atrial rate.