sex and virginity

when is it okay to have sex and why?