In addition to the other answers, it is important to note that...
During photosynthesis, plants release oxygen. Photosynthesis occurs when a plant is exposed to light.
During cellular respiration, plants release carbon dioxide. Cellular respiration occurs constantly.
Plants do not photosynthesise at night (without light).
At night, plants produce only carbon dioxide.
As noted by others there are exceptions. For this reason, we only keep Sansevieria sp. in our bedroom, as it has the capacity to absorb carbon dioxide at night.
Plants absorb the energy they need through aerobic (cellular) respiration, which is a chemical reaction that uses the oxygen in the air and glucose from within the plant to form carbon dioxide and water. The plant derives the energy it needs to live from the water and carbon dioxide formed by the respiration process. To remain alive, the plant must respire at all times.
Cellular respiration is linked to photosynthesis but the outcome is opposite. Photosynthesis uses energy from light, primarily from the Sun and the carbon dioxide in the air to produce oxygen. Cellular respiration uses up oxygen and produces carbon dioxide.
Not only do plants respire at all times, the rate of respiration remains constant throughout the day and night. In bright light, the rate of photosynthesis exceeds the respiration rate, while in dim light the rate is about the same. In darkness, photosynthesis stops but respiration continues.
Sansevieria - Air purification
According to a NASA Clean Air Study, along with other plants such as
golden pothos (Epipremnum aureum) and corn plant (Dracaena fragrans),
Sansevieria trifasciata is capable of purifying air by removing some
toxins such as formaldehyde, xylene, and toluene. Sansevieria use the
crassulacean acid metabolism process, which absorbs carbon dioxide at
night, although oxygen is released during daylight. Nighttime
absorption of CO₂ purportedly makes them especially suitable bedroom
plants. However, since the leaves are potentially poisonous if
ingested, Sansevieria is not usually recommended for children's