1. I would say "congratulations" to someone who has got engaged or has had a baby.
2. I would congratulate someone if they got an award or passed a big exam.
3. I would congratulate someone who has just got married or has graduated from high school. People traditionally give congratulations at these times.
4. I always say "congratulations" when a friend gets the highest mark on a test. I think they deserve it.
5. I like to say "congratulations" when my friends do well at a competition. I think it makes them feel even better about themselves.