Yes, children can go to funerals, and many families find it helps them to say goodbye. The right answer depends on the child, their age and how close they were to the person who has died.
Prepare them first
Explain in simple words what will happen: there will be a coffin, people may cry, there will be music and words about the person, and then everyone will leave together. Tell them they can ask questions at any time.
On the day
Sit near the end of a row so you can step out if needed. Bring something quiet for younger children to hold. Ask a trusted adult who is less close to the person to look after them, so you can take part in the service too.
If they do not want to go
Do not force them. They could help choose a song or write a card instead, or visit the grave or garden of remembrance later.