If you have a nuclear protein or if you have a membrane bound protein the epitope might not be available for the antibody to attach to the protein of interest. When you have the proteins bound in a membrane (Western), the proteins have been separated and the epitope might be more accessible to the antibody you are using to detect it. When you have the proteins "in vivo", you have many proteins interacting with your protein of interest and you have the protein in its native state. Therefore, the epitope might not be available. Sometimes using a different antibody is all that it takes to detect a protein by IHC. Sometimes it is more complex and you have to really prep the tissue or cells to be able to work with them. I hope it helps.
i think maria is right. in IHC the epitopes are in part not so easily accessible as on the WB. is your antibody recommended by the manufactor for IHC? sometimes you can solve such problems by using another fixation method for the tissue, somethimes only a new antibody helps.
The antibody may be unable to recognize the fixed epitope in IHC. Also, fixation method can really affect immunofluorescent staining. I would try a few different fixation conditions to see what works - or go to the literature and see what others are using for this antigen.
There could be a number of factors at play as everyone has suggested above. It could be you need to alter your antigen retrieval, perhaps increase the pH to unmask the antigens within the nucleus? During western blotting you denature the proteins during the heating step and addition of the buffer, it could be the antibody only recognizes this form of the protein and that the 3D native protein structure isn't bound by the antibody. One way to check this is to perform a blot in non-reducing conditions, this will not fully prove it but may help. What are you using for control in your IHC? is it possible that the protein is just not in the samples? A very good control is to embed cells that you have grown that are known to express the protein of interest and then treat them as you treat your tissues/samples under investigation, it would be interesting to see if they came up positive with IHC. Another variable is the sensitivity, perhaps the IHC method is not as sensitive as your western blot method, you could try a different secondary/biotinylated layer kit or different detection method to "amplify" any signal. Good luck, please keep us updated.