The more closed the position the longer castling can be delayed, generally speaking.
In some well-analyzed openings a player may routinely not castle at all. If memory serves, Anand did so in the semi-slavs of his match with Kramnik. Someone correct me if I'm in error here.
Not an example for the average player though.
In the past, I've always had an idea of a three-phase opening: 1) going for the center, 2) castling, and 3) preparing an attack. However, recently in my studies I've seen a couple GM games where one player delayed castling the king until sometime in middlegame.
Are there any general guidelines as to when this is appropriate?