In case of ac generator, when a coil is rotated in a magnetic field, a current is induced in the coil which can be used as a source of energy When the coil is rotated, the direction of induced current keeps changing with each half-rotation. So there is a need to change direction.
Whereas In case of DC generator a split commutator is used so that direction of current remains same, because after half-rotation a different end of the coil comes in contact with the brush. So there is no need to change direction.