Rainforests are considered the "lungs of the Earth" because they play a crucial role in producing oxygen and absorbing carbon dioxide through photosynthesis. They help regulate the Earth's climate by storing carbon and releasing oxygen, making them vital for maintaining the balance of gases in the atmosphere.