A parent's job is to help a squalling infant transform into a healthy, independent adult. This includes making sure they get the information they need in order to form healthy adult relationships. Other institutions, prominently the state and the church, have an interest in educating children about sex (or deliberately keeping them misinformed, as the case may be. Things get sticky where these competing interests intersect. The responsibility for sex education belongs entirely to the parents, though.
This doesn’t mean that parents need to have the notoriously awkward “talk” with their children. Ideally, it’s an ongoing discussion that starts with teaching children the names of their body parts, as well as “good touch” vs. a “bad touch.” Alternately, or in addition, parents can make sure their children are being properly educated by another source, such as a sex ed program in their school. The parents can also provide the children with books or other resources, so that they can get their questions answered without the embarrassment caused by having to ask an adult.
The state has an interest in educating its citizens, as well as in keeping them healthy. This is why we have a public school system, and this is why children are required to have vaccinations before enrolling in that system. Since it advances public health and costs no extra money, it makes perfect sense for sex ed to be included in the curriculum. It helps fill the gaps a child might fall through if parents are unwilling (or unable) to educate their children on this important topic. However, the parents rights and responsibilities should supersede the state; just as parents can elect not to have their children vaccinated, they should be able to choose whether or not they want their children exposed to the schools sex ed program.
The schools sex education program should not be tied to religion in any way; separation of church and state, and all that. The program should provide students with the tools they need to make informed decisions. It should be a completely secular, unbiased, scientific, clinical view. However, there are parents, policy makers, and educators who hold religious beliefs that help form their decisions on what is right and wrong in regards to sex. If you believe that it is wrong for someone to be having sex before marriage, it makes sense that you would teach them things that would discourage them from doing it. You might exaggerate the negative aspects (or, if you are particularly dishonest, invent them), for instance, just as you might ignore the positive ones. The same thing happens when schools try to teach children about drugs.
With this in mind, it is not surprising that schools often fail to provide students with useful (and accurate) information. Hopefully this will change in the future, though. Sexual education programs in the public school system are not even close to what they should be. There is whole array of things that I wish someone had taught me about sex when I was younger, and I’m angry that I was lied to about these things.
Ultimately, however, it comes down to the parents. They have to care and pay attention; they have to make sure that their child gets everything they need to have a full and healthy life.