Talking about how much money you make — especially in the workplace and among friends — can be a thorny topic. But that doesn't mean you should stay quiet, says "Shark Tank" star Kevin O'Leary.

You should "absolutely" talk about your salary, he says.

"Here's why," O'Leary tells CNBC Make It. "Very often you'll find out, as you talk to friends that work in the same industry as you, that they make significantly different salaries. And you need to know that. Because there's different firms all doing the same thing, and by knowing what [multiple] people are making, you can find out your market value."

"Most people will share it with you because they also want to know the same thing: Where do I fit in the whole picture of things in terms of salary?" O'Leary says. "That's why communications matter."

Indeed, experts say that when people share their incomes, pay equity improves. But a 2018 Bankrate survey found that fewer than one in 4 people have shared their salary with a co-worker. However 33 percent of millennials have shared their salary with a co-worker and 58 percent have talked about it with a friend.

"People are often worried that talking about money may be construed negatively by their bosses. That's ridiculous," O'Leary says. "Employers — and I'm one — know that my staff are going to talk about their salaries. It's not a secret."

"That makes me think when I'm giving a raise to one person in a department, that maybe I have to give a raise to someone that works right beside them," he adds. "It's a good thing because I want to treat everybody fairly."

"I know they talk, and I don't want unhappy employees, particularly good employees," O'Leary adds. "I don't want to lose them over a 5 percent raise or a 10 percent raise."

In fact, employers are legally barred from forbidding employees to discuss pay and benefits (with a few exceptions) thanks to the National Labor Relations Act. And in 2014, then-President Barack Obama signed an executive order prohibiting federal contractors from retaliating against employees who share their compensation.

Still, if you don't want to ask others about their salary or share yours, resources like PayScale and Glassdoor offer tools to help you determine the pay range in your job or industry.

But talking about money isn't just beneficial professionally says O'Leary; it can be a bonding experience too.

"If you want to really bond with somebody, share your ideas about money," O'Leary says. "Everybody is concerned about it, everybody's thinking about it, everybody has to have it. It's a great topic to discuss. Why? You might learn something. You may see how other people work with money and maybe, that's a good thing."

Don't miss: Kevin O'Leary: Don't buy a car, do this instead

Like this story? Subscribe to CNBC Make It on YouTube!

Disclosure: CNBC owns the exclusive off-network cable rights to "Shark Tank."