Used to comment that something unfortunate cannot be fixed or helped, and usually also that the speaker does not seem to care that this is the case. Basically a colloquial form of “Tough!” as in “Well, that’s too bad!”
Jake: “Ben, I want seven cupcakes like you have. I hate having only six cupcakes!”
Ben:”Well, Jake,tough beans! You know the rules: seven cupcakes for me and only six cupcakes for you! So live with it!”