Desmond Morris in Gestures: Their Origins and Distribution traces the practice back to a medieval custom used to seal business transactions. Over time, the mere sight of an upraised thumb came to symbolise harmony and kind feelings.
World War II
During World War II, pilots on U.S. aircraft carriers adopted the thumbs up to alert the deck crew that they were ready to go and that the wheel blocks could be removed.
The gesture’s popularisation in America is generally attributed to the practices of World War II pilots, who used the thumbs up to communicate with ground crews prior to take-off. This may have originated with the China-based Flying Tigers, who were among the first American flyers involved in WWII. The appreciative Chinese would say ”挺好的“ (“ting hao de”), meaning “very good,” and gesture with a thumbs up, which in Chinese means “you’re number one.” High officials in Chinese government see it as a sign of respect. Any person from China will recognise this numerical gesture, and it can be seen in movies and photos of the era, though this has not been verified in print by American Volunteer Group (AVG) pilots. American GIs are reputed to have picked up on the thumb and spread it throughout Europe as they marched toward Berlin.” Combat pilots in the US and around the world still use this gesture.