"Eat your vegetables; they're good for you" = they'll make you strong. "Take your medicine; it's good for you" = it will make you well. The speaker was using this phrase to mean that having a drink (alchoholic, probably) would make his attitude better, it might calm him down, forget his troubles.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.