I think it has to depend on the child and the circumstances. In our case, we feel it worked well bringing our children to my father's funeral, despite them being young - but we knew they would behave, and had brought my MIL with us, so they could be taken out if necessary. In the event, they all behaved very well (but as I said, we were regular churchgoers, so they knew how to behave, and we didn't need to bring books or toys to keep them quiet).
We had also talked it over with my mum and my sister beforehand, and both were happy for us to bring the boys, knowing that we would make sure they behaved and were quiet, or they would be taken outside.
Unless it is specifically decided in advance, and everyone is OK with it, I do NOT think it is acceptable to bring children in fancy dress costumes, as a previous poster described, or to bring anything to entertain them that would create a disturbance at the service - so a book might be OK, if the child is one who will sit quietly and read, but not a noisy toy, or a lot of different toys, the getting out of which will be a disturbance - if that makes any sense.
I also think that, if you know your child is likely to be noisy or disruptive, or to get upset at what is happening, then it is better for them not to go - for their sake and for the sake of the other people there.
I do also think that funerals vary - some are very sombre, quiet occasions, where any noise from a child would be noticeable and unwelcome, and others are less sombre, more a celebration of the person's life, and there a child's presence, even if not quiet and unobtrusive, would not be a problem.
So, in short, you need to know what sort of funeral it is, what sort of child you have and how they are likely to behave at the funeral, the views of the other close relatives of the deceased, and what support you will have - and then you can look at all of these factors together, and decide whether it is appropriate for this particular child to attend this particular funeral.