You do not have enough control of e4, and if white gets to play e4-e5 here, your king is a goner. It is an absolute must here to stop that plan, and the only way to do it is d5. Making your Bb7 bad for now pales in comparison to letting your king get mated, or loss of significant material, which will happen after e4-e5.
Other than controlling the e4-square (as noted by PhishMaster), there are some additional reasons ...d5 could be useful, which I'll list below. But even if these reasons didn't exist, ...d5 would still be best since controlling e4 is necessary.
1) It gives Black's queen more space.
2) It controls the c4-square, potentially stopping White from playing Nc4 (and discouraging c4). These moves aren't dangerous now, but they could be later on. For example, if you want to play a move like ...Bd6 at some point, avoiding Nc4 would be nice.
3) In general, it gives Black more influence in the centre, simply by virtue of pushing a pawn to d5.
You're right that the move blocks in the b7-bishop, but in a way it also increases the piece's strength. Now the bishop's control of e4 actually means something, since Black has a good chance to fight for it.
But note that if you want to exchange off the bishop, this could be done with ...a5 + ...Ba6 (eliminating White's dangerous d3-bishop); notice how without a pawn on d5, White could easily meet this with c4. In addition, another plan for you after ...d5 is ...Nce8-...Nd6, further clamping down on e4. Putting your knights on f6 and d6 is an important theme against the Stonewall structure.
In addition to the other answers, I want to point out that closing your Bishop's activity isn't important here:
Your bishop isn't active. Sure it's got an open diagonal, but it's not generating any threats. In the first position, you could play Bxf3 but then White would just recapture with the Queen and you've not achieved anything. In the second position, it's not like you are able to mount a kingside attack. The Bishop attacking g2 does absolutely nothing then.
Your bishop's activity is "low quality". White is easily ready to counter the activity. If White gets to play e4 then your bishop effectively becomes useless even though you haven't blocked the diagonal.
In other words, you don't actually lose much by playing d5.
There are multiple ways in which d5 could be useful here. The obvious answer is because it grabs grip on the e4 square. It also prepares the advance of the c pawn to c4 which will lock down white's LightSquared bishop. If you aren't comfortable keeping your bishop like this for portions of the middlegame then you can play h6 to force the knight back and capture it. Then you can play d5 and potentially c4.