Hypothalamus controls the emotions like fear, anger, excitement, pleasure, sexual arousal and bodily responses to the emotions. Amygdala also regulate the sexual behaviour.
The regulation of sexual behaviour by hypothalamus is mainly through the gonadal hormones. The hormonal differences in males and females are partly responsible for sexual differences in the brain.
Apart from the hormonal effects, the variation in epigenetic effects that make changes to the architecture of the hypothalamus might be responsible for functional differences in homosexuals and transsexuals.