Wiring basic LED light to former ceiling fan box...too many wires?
Switch loops and you

The switch for your light was configured as an old style switch loop where the black wire is the always hot going out to the switch and the white wire is the switched hot coming back from the switch.  This was quite common before recent Code revisions mandated neutrals at most switch boxes in new construction (in order to power dimmers, timers, and other "smart switch" type gizmos).

Anyway, what you'll need to do is mark the single white wire in the light box and the white wire in the switch box with a few wraps of black electrical tape, then wire the single black wire from the wall cable to the black pigtail.  From there, you can connect the white wire on the fixture to the white pigtail, the black wire on the fixture to the taped white wire, and the green wire on the fixture to the bundle of bare wires, which should be redone using a proper wirenut anyway.  Button it all up, turn the breaker on, and enjoy your new light!