Dear Student
The two main functions of stomata are to allow for the uptake of carbon dioxide and to limit the loss of water due to evaporation.
Despite the fact that the stomata open in response to light, they may close on a hot day in order to conserve water. This is because the heat may cause the water to evaporate out through the stomata, causing the plant to lose water, reducing the water potential inside the leaf.
So on hot summer day stomata of plants may close.
Regards