I had a question recently from a parent on how to start teaching gun safety to their 4 year old. This was not the first time I’ve had this kind of question. My philosophy is that as soon as the child can move under their own power, it is time to start teaching gun safety. Of course there are varying degrees, but the little ones can learn to Stop, Don’t Touch, Leave the Area, Tell and Adult using the NRA’s Eddie Eagle program, additional materials available at http://eddieeagle.nra.org/ . As they get older, you can start to teach them safe handling in a supervised way with NERF, Air Soft, even Water Guns (although not pointing it at someone does take some of the fun out of the Super Soaker) but you can set up paper targets and compete with each other and save getting wet for running through the sprinkler. Some Finger Paints on WaterColor paper can be a lot of fun with water guns, make the paint run and then save the artwork!
As for taking them to shoot real guns, I usually suggest 6, but parents know their child. A 6 year old might not be ready or they may have been shooting for a year already.
Some instructors are happy to work with kids and have developed curriculums just for families. 4H and Scouts often have youth programs to help kids learn to shoot safely.
In the end, it is the parent who is ultimately responsible for ensuring that your child understands, at an age appropriate level, what is safe and what isn’t. Even if you do not have guns in your home, your child’s friend may.