It's a show of strength or dominance. Male puffins may also tap their beaks as they prepare to fight for territory or food. During these situations, the tapping sound is used to intimidate or threaten the opponent.
It's a form of communication with their young. Puffin parents will tap their beaks together while standing outside the nest cavity as a way of communicating with their chicks. This tapping sound lets the chicks know that it's time for them to come out of the burrow and explore the surrounding environment.
It's a warning signal of an impending threat. When puffins are threatened, they will often tap their beaks together as a way to warn other puffins of the danger. This tapping sound can be heard from quite far away, giving the other puffins plenty of time to move to a safe location.