Basically the views from society frowns upon masturbation and sex in general because of religion, traditional viewpoints, peers, and because of the notion that one is to feel guilty or ashamed if they masturbate.
Now of course society has been progressing quickly since most people now realize that masturbation is perfectly normal and okay to do. More and more the people that look down on masturbation are getting out numbered by people that are accepting of it.
Masturbation is considered a social taboo because it is something extremely personal and private to do. You probably wouldn't tell your peers about some really personal secrets, so why would you discuss this? Generally the best bets are your good friends and maybe a parent you can trust.
Masturbation is also considered to be a "last resort" option in which if a person can't find anyone to have sex with they resort to this. Obviously people are wising up to the fact that even people who have sex regularly usually masturbate as well. Of course, even when people around you know this, they would still rather pretend they didn't instead of facing the truth (eg: A boy asks a question about masturbation in religion class, everyone laughs and makes fun of him about it despite the fact that many of them do it too).
As for the parents question, I'm going to use my own household as an example. My parents aren't religious or anything, but they still believe that I am a virgin. I don't want them to know that I had sex because they hate my ex-gf and it would just create more drama. As for masturbation, my dad caught me looking at porn on the computer and I was banned from it for a while and it was kind of humiliating to know that everyone in your family thinks you're some kind of pervert. I can talk about finding love and relationships with my mom mostly, but not my dad. I don't think I'd ever talk to them about sex again because of what happened in the past and other reasons that I'd rather not share.
I do know of some households that are completely comfortable talking about sex, but mine isn't one of them. I guess it all depends on experiences as well as parenting methods.