Back in the days of drum brakes, driving through a puddle would cause the brakes drums to fill with water. If you stepped on the brakes either while in the puddle or right there after, the brake shoes would press outward against water instead of the brake drum. The co-efficent of friction of water is very close to zero point zilch. In other words you had little to no brakes until the water had a chance to work its way out of the drum. This could take several seconds. This was the reason for the press on the pedal while driving advice. It really did make a difference.
Now a days cars have disc brakes (at least on the front, if not all four wheels) Disc brakes do not tend to trap water like drums did, and therefore the advice is not as necessary. On cars with rear drums, the rear drums will still fill with water, and the advice is therefore still valid, but the fronts (discs) do a majority of the braking.
I will also note that brakes work best when at operating temp, the friction of the pads can and will change with temp. Going through a puddle may cool the pads and rotors to the point that it is like using cold brakes, so a light touch on the pedal may help from that point of view also.
Bottom line, if you have drum brakes Yup it is valid advice
if you have disc / drum combo yes to the extent that the drums need to dry out.
All disc A lite touch on the pedal, won’t hurt and will help keep the pads at operating temp.