These verses are part of a longer message in this chapter to King Lemuel from his mother (:1-9). “Wine” from grapes or some other summer fruit (date or pomegranate) and “beer” made from barley are the intoxicants spoken of here. Corn liquor was unknown in the Biblical world.
While there are a number of general warnings in Proverbs against alcohol intoxication for everyone (see 20:1; 23:29-35), here it is directed specifically to “kings” and “ruler.” When leaders drink alcohol they might begin to “forget what the law decrees” which may well “deprive all the oppressed of their rights.”
Of course, any of us can make very poor decisions while under-the-influence which may lead to disastrous consequences to others or ourselves. So we all have the responsibility to not let this happen in our lives.
But King Lemuel’s mother points out here the special responsibilities of leadership. Leaders have been given the special privilege of leading and serving others. Their position and role in life is to be for the overall greater good, and alcohol just doesn’t contribute much toward that end. So be a good leader and just say no!