Spill the beans
The police have arrested one of a gang. They expect co-operation. If they get it, things will be a bit better for him. The detective goes in to him and says: Okay, spill the beans. The expression means tell all that you know.
A lot of books on idioms tell us that when Greeks 2,500 years ago voted on various matters they dropped a white bean into a vase for yes, and a black one for no. Sometimes one black or negative vote was enough to stop the proposal. If someone let the beans out and you saw a black one, you would know the result.
It is true that Greeks did vote like this and in more recent days a similar system was used to vote on whether to allow someone to join a club. Black and white balls were used and if someone was against you, you were blackballed and kept out. But the meaning is not really the same and there is a long gap between ancient Greek voting and a modern American idiom.
Spill in the sense of pour out is clear enough, but why beans? Your guess is as good as ours. Could it be beans pooping out of their pods? Certainly, beans are common enough.
East Asian food would be very different without the soya bean, and baked beans are almost a national dish in Britain, and cowboys would not have survived without them.
No wonder when you are happy, people may say you are full of beans today!