The accumulator is connected directly to the evaporator outlet and stores excess liquid refrigerant. Possibly, the most important role of the accumulator is it's ability to isolate the compressor from any damaging liquid refrigerant and oil. Introduction of liquid refrigerant into a compressor can do serious damage. Since the orifice tube is "fixed" in size, some operating conditions, particularly during cooler temperatures, will allow large amounts of boiling liquid refrigerant to exit the evaporator. The accumulator is put in place to capture this liquid, and act as a holding tank where liquid refrigerant can boil into a gas before it reaches the suction side of the compressor.
Accumulators, like receiver-driers, also have a Desiccant filled bag which traps debris and moisture.
You should replace the accumulator if it's over five years old - or - any time the system is opened for major repair. It important to note that many compressor suppliers will not warranty a replacement compressor unless you replace the accumulator as well.