This is generally used when someone has done something that requires appreciation, acknowledging or praising.
So for example if a child at school has answered a question correctly the teacher may say ‘clap for him/her’ and the whole class will erupt in clapping. This is where the phrase is used the most. It is also used amongst adults when someone has done something of good note.
It can, though, can be used playfully, well amongst us maybe! For example when said to someone when they have managed to do something well, such as opening a water bag without spilling it (a little extreme but you get the gist!). Likewise if you’ve gone and bought ice-cream for everyone!
So next time someone gets something right, go on give it a go, clap for them. It may make you feel good!