There is no definitive answer to this, but we would recommend being at least six. Even then, it can be a hard going initially. But sometimes we’ve had five years olds get on surprisingly well.
Sometimes it makes sense for younger pupils to start on ukulele and then graduate to guitar. A lot of chord shapes are the same on a ukulele and there is a good crossover, much in the same way recorders lead well to the flute (although ukulele sound infinitely better than recorders in our opinion!)