You know when you coughing, it will lead to nerves fatigue around eyes socket even blood congestion. Moreover, there have some nerve cells in your brain to delivery the visual signals. The messages which pass on by them will translated in some specific thing we know such as birds, tree etc. If the hard coughing shakes your head and brain, these nerve cells tremble, and then misunderstand the message into tiny pieces such as star and light. When the cough is healed, these symptoms will disappear. No worries! You may need some water and nutrients to supply your blood circulation, relax and have a rest, it will recovery soon. Unless the symptom will last for a long time, you have no need to worry about it.