A counterspelled spell has no effect, and a spell's effect is its description.
Counterspell says:
its spell fails and has no effect.
The effect of booming blade is exactly its spell description:
As part ofYou brandish the actionweapon used to cast this spell, you mustin the spell’s casting and make a melee melee attack with a weaponit against one creature within the spell’s range, otherwise the spell fails5 feet of you. On a a hit, the target suffers the weapon attack’s normal effects, and it then becomes sheathed in booming energy until the start of your next next turn. If the target willingly moves 5 feet or more before then, it immediately the target takes 1d8 thunder damage, and the spell ends.
The entire description of booming blade is the spell's effect. This is stated explicitly in the rules for spellcasting:
Each spell description in Chapter 11 begins with a block of information, including the spell's name, level, school of magic, casting time, range, components, and duration. The rest of a spell entry describes the spell's effect.
Therefore, if booming blade is counterspelled, it has no effect, meaning everything in the spell description does not happen, since the spell description is that effect. The effect of a successfully counterspelled booming blade is:
There is no effect (quote block intentionally left blank).
A November 2020 Errata changes the spell description significantly.
Originally, the spell description said:
As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell's range.
This was changed to read:
You brandish the weapon used in the spell’s casting and make a melee attack with it against one creature within 5 feet of you.
Many of the answers the argued against my interpretation here relied on the phrase from the original description, "as part of the action used to cast this spell". This is no longer in the spell description.
Now, the spell states that the weapon is used in the spell's casting, and then you make the melee attack. This definitively designates the melee attack as an effect of the spell, which counterspell nullifies.