That indicates a display problem or, in the best case, a display connector problem.
If you purchased AppleCare for the computer, just take the Mac to an Apple Store or reseller and you will get it repaired for free without any problem. If not, you will have to pay a new display for the iMac (around $300 for the 21'5-inch iMac). Unfortunately, there's not too much you can do
Thanks for your input, mende1.
I took a screenshot of the desktop with the green line, opened the screenshot in Preview, moved the Preview window of the screenshot, the green line stayed stationery. The screenshot of the desktop did not show the green line. (BDAqua from another thread suggested trying this to determine if it was video card or LCD problem, my results indicate an LCD or internal cable issue, according to this test.)
I guess $300 is better than purchasing a new iMac.