Threatening the Queen in the bishop with Bg5 I have long been playing games in which I can develop my bishop to g5 like in the following positions:




The truth is I have trouble deciding if such moves are useful. In the diagrams, what pushed me to playing such move is specially my pawns on e5. But maybe come to think of it, that is not much of a compelling factor. Is there anyway to reliably determine when this move would be worth it?
When your pawns are on the dark squares, as in your examples, it is often "Positionally" desirable to exchange your dark squared Bishop so responses like ...Be7? would leave Black weak on the dark squares.  

But in chess you must be concrete, which means you must calculate.  What if Black plays ...f6 which is often a thematic assault on your pawn chain -- now with tempo.

Look over grandmaster games and learn from what they do.