When driving screws into interior walls it's important to avoid driving into wires or pipes. Wires and pipes going through studs should normally be going through a 1" diameter hole that is centered on the stud.
Interior drywall are typically 1/2" so a maximum screw length to avoid hitting something would be 1/2" + 1 1/4" = 1 3/4". For a cabinet back that is 3/4" that would mean 1 3/4" + 3/4" = 2 1/2".