My case-in-point. I ride two very different bikes depending on the weather;
My good weather bike weighs 18 pounds (8.2kg) and has 700-23 slick tires at 110 psi
My rain bike weighs 35 pounds (15.6 kg) and has 700-32 treaded tires at 85 psi.
On level ground at constant speed the effort to ride the heavier bike is slightly higher due to the tire difference. On hills, the heavier bike is night-and-day more effort to ride and my times and average speed for equivalent rides are significantly worse on it.
So, yes, weight matters but mine is a fairly extreme example as the heavier bike is nearly twice as heavy as the lighter one and adds 10% to the entire rider/bicycle system.
Where weigh watching gets extreme is those who spend great amounts of money to shave a few grams and agonize over even slight weight differences. The physics don't support the cost but that can be a hobby all in itself.
The exception is very serious racers for whom both psychologically and physically lower weight is desireable as they are competing with near equals and any advantage is worth while. In fact the UCI, the governing body for professional racing, has set a lower weight limit for bicycles in an attempt to head off a very expensive weight war. It didn't work but that's a topic for another thread.