the advantage is it looks cool, and it may in my head but my painted engines have always seemed like they stayed clean better, I think the paint smooths out some of the casting porosity that usually holds on to dirt and grease. If the iron block is bare, it will rust, so it's best to paint it for sure. No disadvantages that I've ever experienced or heard of.
With the head, I paint if its iron, leave it bare if it's aluminum.