They let sunlight pass through the atmosphere, but they prevent the heat that the sunlight brings from leaving the atmosphere. Overall, greenhouse gases are a good thing. Without them, our planet would be too cold, and life as we know it would not exist.