Development of male genitals before birth is due to what?

Genetically, the Y chromosome; hormonally, testosterone levels.