'Give someone a hard time' in a very specific way - a punch in the jaw. The word 'have' is not part of the 'jaw' idiom; it's usually 'give him one in the jaw'. In your example the 'have' goes with the other verb 'let' - 'let him have it' refers just to any kind of punishment (just giving someone a stern reprimand - if it's violent enough - could be referred to as 'letting him have it'); if you want, you can specify the 'it' - for example 'one on the jaw'.
(Related idiom: 'to let someone have it with both barrels' (as with a shotgun) = to give unrestrained punishment - often just shouting at them.)
- For Teachers