This suggests that something stressful has happened with the child outside the home. It can be anything from fear of an animal, a firecracker bursting out of nowhere to getting bullied by peers or abuse by someone. Take your child into confidence and ask them the reason behind not going out gently. If they refuse to answer, don’t pressurise them too much.
You can try asking your child a few times. But if they never answer, you can take your child to consult with a psychiatrist. If the child refuses to go out totally, you arrange home visits of a psychiatrist.