Journals set their own criteria for determining which papers to publish, but anything that's original and advances the knowledge of the subject is generally publishable somewhere. The catch is that it's very difficult to do research outside the academic world. That difficulty varies with the field. As you mentioned, companies like Google and Microsoft regularly publish computer science papers; on the other hand, there really isn't alternative to academia for pure math research. Doing research at a company requires it to be willing to support your work, and very few companies are interested in supporting pure research. More applied research still requires companies to invest in their reseachers, and that generally requires a PhD, academic experimence, or some other bona fides.
If you're specifically interested in doing research yourself without a PhD, your best bet is probably to get involved with one of the few companies like Google or Microsoft that does publish large quantities of papers, put your name on its published papers even if it's just doing background or logistical work, and try to build up enough clout and experience to persuade the company to start letting you run research projects yourself. It's a hard sell, even with all the bona fides in place; companies are about making money, not doing research, and it's hard to spin publications as being profitable. You might have more luck at government labs, although their friendliness towards research and publications vary.