An NG tube is needed in children when they are unable to eat or drink normally due to conditions such as prematurity, neurological disorders, gastrointestinal issues, or postoperative care. It can also be used to remove stomach contents or to relieve pressure in cases of intestinal obstruction.