The role of stomata in photosynthesis is to allow air containing carbon dioxide and oxygen to enter the plant through the leaf stomata.