My friend and I were wondering if you think it is ok for children to go to funerals. If so, what age?

Yes. I see no problem with children attending funerals. If they are "too" small (2-4), they may just end up having "good" time at the funeral. If they are older, they may not necessarily understand what's going on, but, at least, might just stand silently. I actually believe that children must see both sides of life, not just the bright one.
If the loss was of.. .Someone close, there really is no lower limit. A child who is old enough to feel the loss is also old enough to participate in family's mourning.