If your company is enjoying fat profit margins, record-breaking sales numbers, and unprecedented expansion then by all means -- walk in there and ask for a raise. Things are obviously coming up roses and you need to strike while the iron is hot.
But, on the other hand, if the people on each side of your cubicle have been let go in the last few months and employees are getting e-mails on a daily basis asking if anyone has ideas on how to cut costs, that's usually a red flag. Especially considering the down economy as of late, it's important to know where your company stands financially before you ask for a raise. Walking into your boss' office the day after a dismal quarterly report is issued makes you look unprofessional, self-serving, and out of touch.