What screw length for screwing down stair treads into stringers?
Drill pilot holes (with a slightly smaller diameter than the screws' root diameter).  Use screws that are between 2 and 4 inches long.  Deck screws are available in this size range, and are used for this purpose on deck stairs.

Drilling pilot holes will help prevent splitting the wood of the stringers.

Stringers are often made of dimensional lumber, so they are often only about 4" thick at their thinnest points.