Vinyl siding is not fastened to the wall. It hangs on its nails, and every panel has to be free to slide sideways as it expands and contracts.
Everything about nailing follows from that.

The three rules
Leave a gap under the head. Roughly the thickness of a dime — about 1/32 inch. The panel should be able to slide side to side after nailing.
Nail in the centre of the slot. Not at either end, so the panel can move both directions.
Nail straight, perpendicular to the wall, so the shank does not bind in the slot.
A nail driven tight, at the end of a slot, or at an angle pins the panel. The panel then has nowhere to go when it expands, and it buckles.
How much vinyl moves
A twelve-foot panel changes length measurably between a freezing morning and a hot afternoon in the sun — enough to be visible if it is restrained.
Dark colours move more, because they get hotter. Several manufacturers restrict dark colours or specify tighter installation tolerances for them.
Cutting short at the trim
Panels must be cut short of the J-channel and corner posts so there is room to expand into the pocket.
The usual guidance is around 1/4 inch in warm weather and 3/8 inch in cold, because a panel installed cold will grow and one installed hot will shrink.
A panel cut tight to the channel on a cold day buckles the first hot afternoon. This is the second most common cause of wavy vinyl.
Fastener spacing and penetration
Every 16 inches into studs or into solid sheathing, following the manufacturer's instructions.
The nail has to penetrate the framing or sheathing by a specified minimum — commonly 3/4 inch. A nail that only catches the siding and the wrap holds nothing in wind.
Use fasteners rated for exterior use and compatible with the substrate. Corrosion at the fastener is a quiet failure.
Fiber cement is the opposite
Fiber cement is dimensionally stable and is fastened tight, either blind-nailed through the top edge so the next course covers the fastener, or face-nailed where the manufacturer specifies it.
Butt joints are backed by flashing rather than left with a gap, and cut edges are sealed.
Installing fiber cement with vinyl habits — loose nails, expansion gaps at the trim — produces a rattling wall. Installing vinyl with fiber cement habits produces a wavy one. The two disciplines are genuinely different and a crew that does mostly one sometimes brings its habits to the other.
Diagnosing a wavy wall
Wave that appears in hot weather and reduces in cold is expansion being restrained. The cause is tight nails, panels cut too long, or both.
Wave that is constant is usually an uneven wall behind the siding rather than a fastening problem, and furring or insulated siding is the remedy.
Wave concentrated near a corner or a window points at a panel cut tight against the trim there.
Fixing it
An unlocking tool releases the course above and lets a panel be pulled, re-cut and re-hung.
It is fiddly and it is far cheaper than living with it. Where a whole elevation is affected, the honest conclusion is that it was installed wrong and the installer should return.
The one question to ask an installer
"What gap do you leave under the nail head, and how much do you cut short at the J-channel?"
Someone who answers with numbers has installed vinyl correctly before. Someone who says they nail it tight so it does not rattle has just described the cause of the most common failure in the material.
