For a funeral? A dark or black suit for men and a dark dress or pantsuit for women.
A pantsuit for a woman? hah! When I was growing up in Mississippi, a pantsuit was not appropriate at a funeral. By the time I was 20, there were some females who might have worn a pantsuit to a funeral, but hoity-toity folks would have looked down their noses at them and said they were dressed inappropriately.
Personally, I try to dress in a way to blend in with the crowd.
I wonder how the common folk dressed when they went to see Shakespeare back in the day.
I think it depends who died... I went to the funeral of a high school friend who played in rock and roll bands, and we wore the t-shirts of bands he had been in and jeans.
We had a dixieland band at my mother's funeral service, and the ladies from her jazz society wore their fancy roaring 20's fringe and sequined flapper dresses to her service becaused they loved her. I wore pink.
I got married on the beach at our home, and made sure to be clear that everyone should dress for the beach, in shorts, sandals and/or whatever would be comfortable for them. It would have been out of place and uncomfortable had anyone showed up in heels only to try to stand on sand, and find there was nowhere appropriate to sit on the beach in a dress.
I dress according to the situation, but there is a lot more depth to it than that. There's being sloppy when it's out of place, and then there's flexibility that fits the person involved.