It's pretty random. However, if you have way too many guys in your neighbourhood, I think the game will try to redo the balance and produce a girl. I used to get nothing but girls until I made a family of eight women, moved them into an empty lot and after that, I started getting some boys being born.. . But your best bet is to save before she gives birth and reload until you get what you want.