Carbon dioxide is released and oxygen is consumes from stomata all throughout the day and night during respiration (as plants respire during day and night).
It is photosynthesis, during which the plants consume carbon dioxide and release oxygen during day time.