The actual thickness of a 2-by-6 decking board is 1 1/2 inches. Thus, the screws used need to be long enough to go through the board and embed into the framing lumber below.
To make certain that the screws grip the deck joists, they need to penetrate through the decking material and at least 1 inch into joists. That makes the minimum screw length 2 1/2 inches when you are laying down 2-by-6 decking.
Longer screws can be used and are sometimes helpful when persuading warped boards to fit snugly against joists. The longer screw will compensate for the space between a warped board and the joist below. Screws of up to 3 inches long are acceptable.
Types of Screws
Coarse threading is needed to penetrate through wood decking materials and into wood framing. Specially designed screws are needed when using composite decking. Composites are man-made from recycled wood and other materials. These screws are coarsely threaded toward the tip, which will penetrate wood framing, and more finely threaded where they embed into the decking.