As of the November 2020 errata, both Booming Blade and Green-Flame Blade has a material component listed as “a melee weapon worth at least 1 sp” which was changed from “a melee weapon” prior to the errata.
Many items are listed with a cost attached to them. If this cost is at least 1 sp, you can use this item as an improvised weapon as part of you casting Booming Blade or Green-Flame Blade. For example, you can use a shield which is worth 10 gp.
When all you have is an item that does not have a cost listed as the material component for these spells (like a table leg, for example), it’s up to your DM to adjudicate whether or not it’s reasonable for that item to be worth at least 1 sp. If it’s not, then the spell fails. Similarly, spells that lets you conjure a weapon in your hand such as Flame Blade and Shadow Blade now no longer work with these cantrips, because they are not worth at least 1 sp.