If a person has ugly thoughts, it begins to show on the face. And when that person has ugly thoughts every day, every week, every year, the face gets uglier and uglier until it gets so ugly you can hardly bear to look at it.
On the other hand, he talks about the kind of person we all hope to know.
A person who has good thoughts cannot ever be ugly. You can have a wonky nose and a crooked mouth and a double chin and stick-out teeth, but if you have good thoughts they will shine out of your face like sunbeams and you will always look lovely.
Of course the rest of the story is just silly funny. Like many good authors, Roald has a great understanding of people and the way we act and think. He also puts into words the way we think about other people.
So, don't be a twit!