Dear Student,
There are many theories which explain the opening of the stomata. The opening and closing of stomata depends upon the turgor pressure of the guard cell. The swelling of the guard cell due to absorption of waters leads to the increase in the pressure which leads to the opening of the stomata. But when the guard cell shrinks, Stomata closes. Its all depends on the turgor pressure of the guard cell.
There is another theory which is based on the influx and outflux of the potassium ions in the guard cells. This turgidity is caused by the accumulation of potassium ions in the guard cells. As potassium ion levels increase in the guard cells, the water potential of the guard cells drops, and water enters the guard cells and vice versa.
Regards.