I had a research stay abroad in an Institute 2 years ago. A short while after leaving institute (about 1 month later) I submitted an article related to my work there to a journal. Recently my article has been accepted to publish. As I had an email address belongs to hosting server of the institute where I was working there, I want to write that as my email address. Is it right to write email address and the name of institute as the contact address for my article whiles I have left there? In addition,
This may vary from field to field, but in my experience (chemistry) it is always the case that you list your affiliation as the institution(s) where you performed your work; where appropriate, you can list more than one affiliation. In the case that an author's affiliation has changed since the work was performed, the convention is to add an additional "Currently at" or "Presently at" affiliation - your publisher would be able to give the details of how to do this for your article.
For an example of a publisher's take on this, see this excerpt from the ACS publications author guidelines:
Institution Address: The author affiliation(s) listed should be the institution(s) where the work was conducted. If the present address of an author differs from that at which the work was done, that address should be given in an Author Information note