FFS, of course it's fine, there is a world of difference between a black outfit for a funeral and one for a wedding. Or wearing all black to work. Especially for an autumn or winter wedding, I've been to many (last one a few weeks ago) and there were plenty of guests in varying levels of black. Not just the odd person, plenty.
For a wedding, you'd wear black as lace, or satin or velvet, with higher or more blingy heels and dressier jewellery. Maybe a faux fur coat or stole if it's a winter wedding. Then of course it doesn't have to be all black, it could be one colour on a dress, of the accessories and shoes could be a different colour.
Also, not everyone can afford to buy completely new outfits for weddings, especially if they are a periferal guest - outside of the family party. Lots of people of something black in their wardrobes that can be smartened and dress up for a wedding to save buying a whole new outfit.
The celebration of a wedding is turning up and wishing the couple well with a bang on party and lots of laughs. Nobody cares what some random guest is wearing.