In answering this question, we must first realize that the specifics of the case are very important. It is hard to give a blanket answer that covers all situations in which an employee is dismissed for conduct outside of work. It is also true that different states have different laws covering this issue.
In general, if a state (or the federal government) does not have a law protecting a given type of off-duty conduct, it is legal for a firm to discharge an employee for engaging in that sort of conduct. It is, however, better for the firm to carefully consider what it is doing before it discharges a worker for off-duty conduct.
Firms are on fairly solid ground if they fire an employee for some sort of illegal activity. They are also on solid ground if the actions of the worker are in some way damaging to the firm. In other words, if the conduct is likely to degrade the employee’s performance, or if it is likely to tarnish the firm’s reputation, the firm is more likely to be able to dismiss the employee without legal repercussions.
Overall, then, it is hard to know for sure, but the general rule is that firing for off-duty conduct is typically legal.