To be of poor quality or low grade. Can also describe someone's bad character or behavior.
この商品の質が悪いので返品した。
I returned this product because it was poor quality.
質が悪いサービスが増えて、客の不満が多い。
Poor-quality service has increased, and customers are frequently dissatisfied.
彼は質が悪い冗談ばかり言うので、場がしらける。
He only tells bad jokes, so it kills the mood.