I think everyone deserves to be silly on occasion and indulge in some more basic urges and desires. I think walking out of line from time to time does a person and society as a whole a lot of good.
What I count as immaturity is a lack of larger perspective. Yes, you can be silly, but you should remember to do so responsibly, you should keep in mind the people around you, that includes anything from their safety to their feelings. Immature people tend to be self centered, altruism is something you need to learn, and I consider it the main measure.
Basically, if someone is mature, even if they act in a childish fashion, you can talk to them about it and they'll listen. If they're mature, they'll be able to rationally consider changing their behaviour for the sake of a relationship.
If they are incapable of showing consideration for their loved ones, dump them until they learn, otherwise you're setting yourself up for a long run of hurting.