The funeral suit is never worn in the best of circumstances, but there's some things you can do to make sure you look your best and keep respects.
You can never go wrong with a basic black. You want to stay conservative, nothing flashy or tuxedo or club style. In many funerals, a navy blue or charcoal version is acceptable.
For the shirt, go with a basic white. Make sure its collared and pressed. Avoid flashy accessories like cuff links. Choose a conservative dark tie, black or gray. It doesn't need to be solid but don't choose more than a small pattern. Again, you aren't looking to make a fashion statement.
If you're in a pinch a blazer or dark sport coat can be OK. Pair this with a pair of nice khaki pants and a nice white collared shirt. I'm not one to say that you absolutely need to have a dark suit for a funeral. Overly black can make you look like the mortician, too!
Get matching black shoes and a belt. Make sure the shoes are cleaned and in good condition. They should also be comfortable, as there is a good chance you'll be walking and standing quite a bit during the various ceremonies.
In most cases, you should go with a basic wool blend. However, for those In hot summer conditions, you can choose a poplin or seersucker if that would be appropriate. Although they are a little bit harder to find, navy and black can be an option in cotton. You'll know the family or friends best so you can tell if it will be appropriate.