Although the symptom of seeing stars when you hit the head is normal, you should still go to see the doctor and have a full check on the eyes to see whether the organic nerves are well. Usually the strong hit may cause the puffy eyes and other eye problems. You'd better go to have a check.
In the cerebrum, there is a kind of special nerve cells in charge of the transmission of visual signals. These cells can interpret the information transmitted from the eyes into all that we see. But when the head suffers a hit, these nerve cells tremble and the brain will interpret the similar stars image incorrectly. In fact, such thing happens frequently in our daily life. For example, when you pick up something, you may knock your head against the table, under this situation, your cerebrum is surrounded by the cerebrospinal fluid, which plays a role in the protection of the cerebrum. But if the head suffers a hard hit, the cerebrospinal fluid will not have much effect and the hit start over the nerve cells and moves your retina, hence reflecting some ray source, thus you see stars.
Well, it is normal to have this kind of feeling for most people. Generally speaking, when real light strikes your retinas, it will set any of 100 million nerve endings buzzing. And then the nerve impulses zap to the vision section of your brain. In that way, I can tell you that it translates the pattern into a "picture" of the thing you're looking at. And you should know that anything that sets your eye nerves jangling will have a similar same effect, such as the hit head. But on the other hand, there's no organized image being transmitted, and it is just random impulses. Also, your brain can only interpret as specks of generic light. So you should not worry about it. It will be fine.