Wow. I disagree with the general thought that saying you are leaving for more money is a bad idea. I've actually talked to my boss with an offer letter in hand and gotten more money in my current position. I stayed and did a good job for quite a while after.
Let's face it - we work for the money, that's what a job is. I can't speak for every country, but the US is a capitalistic economy and workers have the right to negotiate for a competitive wage and to know what the market rate is.
I do think there's a way to say it, though. "You cheap skates don't pay me enough" is probably not the diplomatic angle you're looking for. But getting time from your boss (even before the job hunt) and saying "I don't understand - I have collegues of similar skill/experience/role in other companies and the going rate in this area appears to be significantly higher than my current pay - can you help me understand why?" is a totally valid conversation to have. There may well be a reason, but it's still up to you to decide whether it holds weight with you in light of the other demands in your life.
Similarly, if you have a better offer in hand it is OK to say it, and to cite salary as a reason for leaving. This is important information and good to know. In fact, if your management is good, they would likely be collecting this data for their next pitch to uper management about why salaries are too low and how it's causing the company to loose good people.
Do be self-aware, however, and realize in your thinking whether money is the only reason you want to leave. Lots of people will stay with a less competitive wage if they see good opportunities in the near term, they have a good work/life balanace, or they have deep love of their team and management. Chances are, if you are looking, these things may also be lacking in your current environment.
It's important to know that, since it should both factor into whether you take a new job, and also what you do when you give notice. If it is purely money, you may be up for negotiation of salary. But if you don't like the whole situation, then it really isn't just about the money, and you should be prepared to be clear that extra money will not fix the situation.
Some of the nastier stuff I've seen is when a manager sticks their neck out for an employee because they think the negotiation is about money, the employee eventually leaves anyway, because the negotation wasn't all about money, and the manager feels cheated, because going to bat for someone to increase a salary is always tricky, so the outlay of effort does force a returning expectation.
Lastly - I disagree that "looking for opportunity" equals "needing a salary bump" - I think it's easy to get fixated on the idea that doing more/higher status work necessarily is a 1:1 relationship with a pay increase, or that doing more is the only way you're going to make more. It's true -- for the most part -- and saying that you need a salary increase may prompt a performance related discussion - but there are times when a shift in the market can mean that staying in a job is a bad decision purely for monetary reasons. Also - there are numerous jobs that offer learning and growth opportunities at the expense of salary - for example, internships. But also in many non-profit situations, less-skilled employees get jobs where they can build resumes, but at a very low (comparably speaking) salary to their bretheren in for-profit firms. In these situations there's plenty of "opportunity" but very little room for "salary".
$x
when everyone else in the industry makes around$x + ~15k
?