Stomatal opening and closure aid in the exchange of gasses between the plant and its surroundings. It also aids in transpiration.