You asked

How should I treat my child's black eye?

Once you have checked with your child's G.P. and any damage to the eye itself has been ruled out and you are sure your child has a simple black eye that’s nothing more than a bruise, you can give him painkillers to help with any discomfort he might be experiencing.
To help reduce the swelling, you can apply an ice pack for 15 minute periods several times a day during the first 24 to 48 hours. Wrap the ice pack in a washcloth or paper towel and gently press against the area surrounding the eye. Ice is the best way of reducing swelling and it will also help to numb any of the initial pain.
You could also use a bag of frozen peas if you don't have any ice handy. If there are any mild lacerations to the bruised area you should keep them clean to prevent infection. 
The eye area has suffered enough trauma so make sure to only press gently on the area. A black eye can last anywhere from one to two weeks and fades gradually. 
For a small child you can try to keep them occupied by telling them a story or by letting them play with their favourite toy. Remember to give them lots of hugs and kisses!

More questions

Children's glasses are subjected to a lot of 'wear and tear', follow our stpes to ensure your child gets the most out of their glasses.
Common eye complaints for children and teens include myopia, hyperopia and astigmatism.
Read more about what is involved in a comprehensive eye exam.
Teenage bodies are constantly growing and changing and during this time, eyesight is liable to change seemingly overnight.
A scratched cornea can be painful but is usually not serious.
Selecting the right pair of glasses for your child is important as they need to be durable but your child also needs to be happy to wear them. 
Children's eyes are sensitive so it is vital to protect them from the sun's harmful rays.
Your young child can have their eyes tested even if they can't read
Regular eye exams are essential in order to monitor your child's eyesight.
There are some signs to watch out for if you think your child may have a vision problem.