The idea behind this idiom is that a drinker can reasonably be expected to consume eight glasses of beer without becoming drunk. The expression was originally armed forces slang from the early 20th century.
RELATED IDIOMS :
behind the eight ball
at a disadvantage
baffled - North American
The black ball is numbered eight in a variety of the game of pool known as eight-ball pool.