Death should be discussed with a child when a natural circumstance arises, such as with the passing of a pet, family member or if heard elsewhere. Be careful when discussing death not to mention that the person is "asleep" as this may frighten the child and contribute to a possible sleep disorder.
It is better to explain to the child that the person/ pet has died (using the correct terms). You may wish to frame it with your religious or nonreligous beliefs, too.
Keep in mind that children who are very young do not understand the concept of death and tend to "forget" which can be unsettling to a person. (Such as if a grandparent passes that they don't see on a regular basis and then they may ask at a family function why Grandpop is not at dinner yet?) This behavior is due to the developmental levels of the child in most circumstances.
Also, note that older children tend to grieve in waves. Sometimes they will seem very upset when first told of the passing of a person and others may seem nonchalant. Again, this is due to their ability to process information. It may be months until they absorb all the meaning of a death and then seem to have grieving when least expected.
I have added a link below to help you with your search for information. Also, note that there are many more links here on Education.com
Take care- Louise Masin Sattler, NCSP
Nationally Certified School Psychologist
I would say when your child asks about it or when someone he/she knows someone knows has died.
If you aren't sure what to say, there are many picture books out there that range from when a grandparent dies to a family pet. If you go to the public library, the media specialist will be able to help guide you. If your child is older, have them ask you questions. Answer them honestly.