There is no specific timing that is unprofessional - you can always look for other work.
Yes, it may be awkward to look for new work just after accepting a new job/salary increase/promotion/whatever, but in this case, having been denied a salary increase, there is nothing that should stop you.
The fact is, dissatisfaction in a job is the primary reason for leaving it - having been denied a salary increase is definitely grounds for dissatisfaction and frankly, if you do leave for a better paying job soon, they should have seen it coming.
Now, in terms of how future prospective employers will see this - that entirely depends on the rest of your CV/Resume. A single job like this will not, by itself, raise any alarm bells. The whole document would tell the story - if you have many such jobs, then there could be an impact. It also depends on your industry and what is considered usual - 10 years ago, programmers could jump jobs every year without any negative impact, for example. Things are somewhat different in this industry these days (recessions do that), but many people will move jobs every two-three years.