Q:

What are good defenses of black King with Bishop on f8 or g7?

As black, I like to return my dark square Bishop to the King after castling short. I want to develop my skills in defending that position. In what openings does it occur?
And how should one in general search for such a nameless(?) concept or strategy? Is there for example a database where one can search for Bf8 in the ten first moves?

A:

There are a lot of openings where Black fianchettos his king's bishop, and it ends up on g7. Versus 1. d4 you have the King's Indian Defense and the Grünfeld Defense; if White opens 1. e4 you can respond with the Pirc Defense. The Modern Defense is usable against both.
Without playing g6, Black has to move his rook on f8 (after castling short) and retreat the bishop to f8. That's far less common, though there are some (side)lines in the Sicilian and the Ruy Lopez where this happens.

A:

The Ruy Lopez and the Philidor have variations with this move so the rook can put pressure on the e pawn.  Since the plan is to restrain and attack the e pawn, these maneuvers often become a fianchetto.
Chessbase does allow a search like this.  It also has a search for just some of the pieces, that is, you can place a king of g8 and a bishop on f8, and the program will search all games which has at least that configuration.  I'm sure that various free databases, such as SCID, chesspad, x/winboard, and arena, have this pattern search.

