What Buddhist Psychology (Abhidharma or "Higher Teachings") has to say about the determination of biological sex -- or sexual dimorphism as a quality of the material particles that make up the body -- is fascinating but probably boring. It is explained as a characteristic of "derived materiality."
An examination of it needs more expert guidance than studying biology. It is on par with particle physics. The only living expert we are aware of, and with whom we have discussed these issues, is Ven. Pa Auk Sayadaw. But he is far more interested in leading meditators to see it directly for themselves than to speak of it in abstract or hypothetical terms. So if one seeks him out, be prepared to practice virtue, sit, attain absorption, and be ready to practice insight-meditation -- in that order.
His teaching students -- Sayalay (Ayya) Susila (Malaysia), Ven. Dhammadipa (Czechoslovakia), Tina Rasmussen and Stephen Snyder (California), Shaila Catherine (California) -- might respond to inquiries regarding. But they, too, are certain to prefer speaking to sincere spiritual seekers rather than theoreticians and speculators.