It’s been four months since you have submitted the revised manuscript. Ideally, you should have received a final decision by this time. But in your case, there has been no progress at all. Therefore, you should definitely write to the journal editor and inquire why the status has remained the same all these months for your paper and by when you can expect the final decision. However, make sure that your tone is very polite and courteous throughout the email.
I submitted a paper in July 2015 and in September received the comments of reviewers, which were good but I had to make some changes. On October 8th, I sent the revised document and since then I have not heard from the journal. The status remains: "a revision has been submitted". Can I write to the editor?