Usually used in the negative: one who doesn't know beans is appallingly ignorant or is wholly unacquainted with the subject under discussion.
One would think that the weather man knows what he's talking about, but judging from today's downpour, I think he knows beans.
Perhaps arose from some dispute over the cowpea, which, despite the name, is more nearly related to the bean than to the pea and which is often called either the black-eyed bean or the black-eyed pea. Perhaps came from Boston, where it would be a mark of the sheerest ignorance not to know that Boston baked beans, to be fit to eat, must be made of that variety of small white bean known as pea bean. Perhaps arose from the British phrase, to know how many beans make five - a silly saying that probably got started several centuries ago by having children learn to count using beans. When a child got far enough advanced to know how many beans made five, he was very intelligent and well informed. Thanks to Katie Cutie.