Why is the digitalWrite output low in voltage?

Gate threshold is 2V-4V.

The gate threshold spec is the voltage that the MOSFET turns off. Not relevant when used as a switch. What you want to see is the voltage that Rds (drain-source on resistance) is specified. On your MOSFET the voltage is 10V so it needs 10V to be all the way on.