Brown pants and a black shirt can be worn together, although many people mistakenly believe that it is a faux pas to combine the two colors in an outfit. Black and brown are both neutral colors in the world of fashion since they both pair well with a variety of colors. Neutrals do not clash and can essentially be paired with any color.
When matching black and brown, however, they usually do not go well in a shoes/belt combination. The one exception to this is dark brown since it is deep enough in color that it can almost pass for black.