From parents, the biology should be taught when the kid asks 'Where do babies come from'. Respectful conduct in relationships of any sort should be taught from a young age as well (In general, but laying out the foundation for sexual ones) and then built on when they get older. The sooner kids learn about sex the sooner they're comfortable with the concept. Getting over the latent sense of puritannical guilt and self-hatred about the whole thing that underpins a lot of Western sex culture is a thing that really needs to happen.
Then, I think from the state it's appropriate to have decent sex-ed classes around 13. Biology, STIs and sexual health with a good bit on how it can be a serious personal thing and really effect your relatioships with other people. Leaving kids to the mainstream that says 'f*ck what or who you want when you want' with no alternative perspective other than nutty abstinence-only types isn't especially healthy. There's too much of an 'Oh God, we're not allowed to have an opinion on these things!' going on with education. At the end of the day, give the kids a few opinions, some necessary facts and let them find their own way.