I am using 2012 and 2013 27 inches. Both have the same symptoms. It works well when connected to an external monitor. However, only a black screen appears on the internal display. When you shine a light on it, the screen appears very dark.
I thought this was a screen issue. However, it is assumed that the problem is not with the liquid crystal display, but with the chip responsible for the backlight on the logic board. What do you think? I found this symptom on my MacBook Pro. Data on iMac is difficult to find.