To express gratitude; to thank someone. '礼を言う' is a somewhat literary/formal expression—more commonly '感謝する' or 'お礼を言う'.
助けてくれた人に直接礼を言うべきだ。
You should thank directly the person who helped you.
彼女は丁寧に礼を言ってから席を立った。
She politely expressed her thanks and then stood up.
小さなことでも礼を言う習慣は大切だ。
It's important to have the habit of thanking people even for small things.