Is it ever a good strategy to discard cards in Race for the Galaxy?
The only situation that this happens in practice that you want to discard for the sake of reducing your hand size is with the Brink of War card Retrofit and Salvage, which allows a player to take all cards discarded at end of turn by other players into hand.  If you preemptively throw cards away to avoid discarding, then you won't be forced to give an opponent more cards.

Round end: After discarding, take all other players' discards into your hand and keep them

In terms of incenting players to use peace rather than military, there is also Pan-Galactic Mediator in Brink of War that rewards you for settling worlds with military to peace settle abilities.  If you have that card in play, you might want to use the peaceful approach to get the reward.

You could also imagine a hypothetical situation in which you discard to avoid claiming the "First to Discard at end of Round" goal, so that another player will chase the goal and take a phase that you want in a multiplayer game.  Such a situation might occur if you are coaxing your opponent to call trade when you have Trade League.  But I've played thousands of games and I've never seen that happen.