Materials writing in EFL is an alternative, or supplement, to teaching English. This can be done either independently, with the hope of selling your work to a major publisher. Or more likely a local publisher. The other alternative is to be hired by a language school or educational organization and to write educational materials for them.
The materials writing could be course guides, supplementary materials for the ESL class, coursebooks or teachers' books. I wrote a series of coursebooks, and a teacher's book, for a chain of language schools in Taiwan, China and Japan. The work gave me a refreshing change of focus for a year.
The amount of money you can earn from writing in TEFL varies enormously. For an English teacher working part-time the pay may be very similar to what you would earn teaching English. Of course, if you write educational materials for a school, the materials will belong to the school - you won't make any royalties for this type of writing. However, if you enjoy it, it can be good work. It will also give you something to show publishers in the future, if you wish to write independently.
Personally, I'll never do this kind of writing again. Any future writing in TEFL that I do will be freelance, with the intention of selling it to a publisher, or, more likely, self-published, which is now becoming a much better option for English teachers.
Writing independently and selling your ESL coursebook or teachers' guide to publishers, or doing yourself via self-publishing, may be harder than finding a writing job. However, if you succeed, you could make more money, as well as having more satisfaction.
Experience teaching, writing ability, persistence, marketing ability and some luck are all important factors. A knowledge of self-publishing too, if you go that route. It would be a good idea to attend TESOL conferences, and network. Meet TESOL authors and publisher's representatives personally and get to know them. Some teachers have their own blog, either for helping learners or teachers.
Writing in EFL, as with any kind of writing, is hard. Most people who begin a book never finish writing it. Most books sent in to publishers are not read beyond the first page. Most of those that are, are rejected. And so on...
However - you will never know until you try.