It's used to express agreement with a negative statement, indicating that you share the same experience or opinion.