There are a lot of different types of evaporators out there, but the main goal of all of them is to transfer heat from the airstream to the fluid (refrigerant) being circulated within the refrigeration system.
But another advantage to an evaporator is dehumidification. When air passes through an evaporator, its temperature is reduced below the dewpoint temperature, causing moisture to condense out of the air. That moisture is the humidity in an occupied space.