Definitely yes, it is not good for your eyes. When you try to write in the dark, there is little light are available for you to see the letter. But you would see the letter clearly with shorten the distance between your eyes and the letter unconsciously. Hence, it is easy to cause eyestrain due to your eye muscles, especially the ciliary muscles would be nerved. If you keep that for a prolonged period, you could have myopia. If you already are myopia, it could increase the degree of your prescription as well as astigmatism.
I mean, do you really have to write or study in a dark environment? Anyway, as far as I can see, it would not be wise for you to do so, because in this way your eyes and vision could be affected and decrease dramatically. And you will feel very tired by doing this. and you just cannot see things clearly, thus your productivity will be low. Anyway, I suggest you not try to do this.
Yes, it is true that writing in the dark is bad for the eyes. If you do this for a long time, your eyes may get blurry at the vision. Then your eyes may get short sighted symptom. Your eye nerves will be damaged if you write often in the dark environment. You'd better change such habit.