Greenhouse gases (carbon dioxide, methane, chlorofluorocarbons, nitrogen oxides, etc.) allow the passage of solar radiation but prevent heat radiation to pass out.
Greenhouse gases are always harmful.
Harmful effects:
Global warming: Global warming refers to the gradual increase in atmospheric temperature of the earth due to increased concentration of greenhouse gases, especially carbon dioxide. The effects of global warming include sea levels rising, melting of glaciers, reduction of crop productivity, frequency of floods, and drought.
Ozone layer depletion: The ozone layer filters out harmful UV rays (UV-B and UV-C). Ozone layer depletion is mainly caused by chlorofluorocarbons (CFC). CFC reaches the ozone layer and causes chemical reactions that break down ozone molecules. Due to this, UV-B and UV-C reach the earth and cause cancers, eyesight problems, impaired immune system, etc.