A quick wiring question about recessed lights. The picture below shows the lights that I'm going to use. There are Two ground wires! Do I pigtail them together or just use one? The black and white obviously are for the power. Why did they do it this way?
Yes, the green wire, the bare wire, and the ground wire from the incoming power need to be connected together.
What you actually have here is the bare wire providing an equipment ground to the fixture itself. The green wire is bonding the junction box to the ground. The green wire is needed in case one of the other wires in the box somehow contacts the box. The bond provides a low resistance path back to your panel so the breaker will trip instead of the junction box sitting there hot for anyone passing by to touch.