Opening and closing of stomata is controlled by amount of water present in the plant....when the plant leaves have high water content the guard cell becomes turgid and opens up the stomatal pore,and water exist as transpiration...when the water content is low,the guard cells become flaccid and stomatal pore closes....preventing transpiration to save water...!!
opening and closing of stomatal pore is basically controlled by guard cells..!!!
Hope the answer helped comment if further doubt persists.....!!! :)