It just comes from the world of gambling. If someone expresses an opinion as to the outcome of a sporting event...eg "England will win the Ashes"...you can be sure someone else will say: "Put your money where your mouth is." That means: "Ok, your opinion is out in the open, so now get your stake-money for a bet on it out in the open, too!" I don't suppose anyone can be certain, but it's quite likely that it originated with horse-racing.