The answer all depends on where you hope to teach (e.g., a two-year college or graduate-level research university) and under what conditions (e.g., in a part-time or full-time position).
If you only want to teach on a part-time basis—let’s say, at a local community or technical college—than you’re probably already in a good position to land a job, especially if you have recent industry experience. For a full-time position at a two-year college, you may or may not require a PhD in computer science or computer engineering. Generally, a master’s level degree in the field and some relevant work experience is considered enough to land a teaching job at a community or technical college. That said, there is one important consideration: your potential income. If you love teaching and just want to get your feet wet in the classroom and make a bit of extra money (at many community and technical colleges, this will only be about $2000 to $3000 per course and sometimes much less), it’s a win-win situation. If you’re thinking about giving up a full-time job in the technology field for a full-time teaching position at a college, however, you should bear in mind that even entry-level computer engineers usually make more than senior-level college faculty. Simply put, you may be looking at a huge pay cut if you’re plan is to move from a full-time tech job to a full-time college-level teaching position.
If you want to make decent money teaching computer science, you’ll probably need to pursue a full-time tenure-track position at a research university, but if you’re gunning for a full-time faculty position in this context, it’s a whole different ball game. First, you’ll need a PhD in a relevant field—ideally, a PhD in computer science or computer engineering from one of the nation’s top-ranked computer science schools (e.g., Stanford or MIT). You’ll also need a record of research and publication—evidence that you can do more than teach but also carry out original and groundbreaking research that is held in the highest esteem by other experts in your specific area of specialization. A bit of teaching experience doesn’t hurt, but at this level, it won’t be the primary concern of any hiring committee. Still, despite the high standards, don’t assume that a full-time tenure-track faculty position in computer science will necessary pay much more than an entry-level position in the technology sector. If you’re lucky, you should be able to land a job that pays at least as much as the average MIT graduate makes rolling out of a bachelor’s program in computer engineering. Over time, you’ll make more (and generally computer scientists take home higher salaries than humanities scholars across universities) but over your life time, you will make less in the academy than you will make working as an computer engineer in the private sector. So what’s the upside? Of course, in a faculty position, you may have more space and time for research—including truly innovative research that may or may not immediately lead to any commercial application—and you will be able to play a vital role as a mentor to the next generation of computer scientists.