It means 'have similar feelings, understand and like someone and their views' - so it's closer to "нравиться".

сочувствовать has another meaning.