How can greenhouse gases be good and bad?
They are necessary to keep an even temperature on the Earth, but if there is too much the temperature will increase.
Greenhouse gases are necessary in order to maintain a balance between the Earth and solar radiation. We call this the solar budget.
The amount of energy that comes into the Earth system must equal the amount of energy leaving the Earth system. If it doesn't then the Earth either cools or heats dependent on if more or less energy leaves the system than enters it.
Without any greenhouse gases the process would be shortwave radiation (sunshine) from the sun reaches the Earth and heats it. The Earth releases long wave radiation (heat) into space. Since the Earth is already quite warm (300 K compared to background heat of space at around 3 k), it will radiate more heat than it receives. As such the system would cool if it wasn't for something to retain the heat. That something is greenhouse gases, and in this context are very important (good).
As I have explained in several answers already, greenhouse gases are transparent to shortwave radiation and opaque to longwave radiation. They allow sunshine to pass through and block the release of heat. Since they block the release of heat, increasing the amount of greenhouse gases will increase how much heat is retained. If you increase how much heat is retained then you are going to increase the overall temperature of the system. Rapid increase in the temperature of the Earth system will change climate and habitats, putting pressure on species to evolve or go extinct (bad).
Rapid climate changed cause by dramatic increases of greenhouse gases cause by humans, is too fast for evolution. I mean it is a little late for a Dutch person to evolve gills, after Amsterdam is already submerged.
We need them to prevent heat from escaping into space but too much of them will retain too much heat, causing global warming.
Your question is worded differently but is essentially asking the same thing as an earlier answer I wrote so I just put a link to it.