The theme is to not lie because if he tells the truth, nobody is going to believe you.
There are many things to support this theme. First, in the story you could see the boy every time saying "Wolf" and the towns people coming. However, they every time get tricked.
In the end though, you could see the boy telling the truth as there was really a wolf but the towns people did not come as they thought it was another prank.