In the heating curve, heat is applied to a solid substance at a constant rate. What accounts for the fact that segment CD is longer than segment AB?
The energy required.
Segment AB accounts for time required to fully melt a solid into a liquid (or freeze a liquid into a solid), assuming a constant rate of heat flow. The more time, the more energy required to melt.
The same idea applies to segment CD, but that is the time required to vaporize liquid into gas (or condense a gas into liquid). Here we have to break most intermolecular forces and free the molecules to travel as gases.
Thus, more time/energy is required to fully vaporize/condense a substance than to fully freeze/melt it.