Using a data set collected against the terms of service of a company? Many entities (companies, websites) clearly state on their terms of service that data collection is not allowed. For example many websites don't allow scraping.

I plan to collect data and then publish a paper using them. I will state how I collected them.

Can my paper be denied if I do the above?

Note: This is not about possible legal consequences. I am simply asking if my paper will be published or not.
Most serious organizations (journals, conferences, etc) have standards of ethics they abide by, and individual peer reviewers also have their own standards of research ethics. In some fields these are very explicit and written out at length, such as with the American Psychological Association (APA) or the Association of Computing Machinery (ACM). 

When submitting to a venue, there is almost always some statement of ethical/legal compliance which you must agree to. As such, violating any aspect of the codes, ethics, or legal principles the organization (or editors, or reviewers) value is absolutely grounds for rejection of a paper, or retraction if violation is discovered later. The editor is fully within their rights to reject a paper that violates any of their standards, and the individual reviewers are free to suggest the paper be rejected on any such grounds. 

Various people and organizations value things differently, so some venues might be more comfortable with some types of violations than others. Some might be OK with violating a terms of service to scrape data, while some others might be happy to reject you outright for such a practice. I'm certain this area is also changing and evolving quite rapidly, so even venues that previously published similar papers might no longer be interested in such methods. Some will even way your methods against the outcomes, and if the research is interesting enough they'll look past the other failings - and some just don't care at all; your research could have been about electrocuting kittens to see how loud they cry and they'd publish it just the same.

I would encourage you to think more long-term than whether or not a paper gets accepted, however. A single accepted paper which shows a researcher to be dangerously negligent, in terms of legal responsibility or ethical guidelines, can quickly find themselves considered a liability to future collaborators, advisers, and employers. Academia heavily relies on reputation, and a reputation of taking short-cuts, ignoring ethical guidelines, and not caring whether what they do is illegal or could result in losing lawsuits...I don't know whether such a reputation will open the kinds of doors you'd be happy to walk through.