As Italy, when is it profitable to attack France?
Simply, when it is a commitment required of (or an opportunity provided by) your best possible alliance. 

Although the tactical situations are not irrelevant in Diplomacy, they should always be regarded as secondary to the choice of allies and alliances. Any country can win, and one should regard the game as more akin to Survivor than to a typical strategy board game. 

Assess the credibility, veracity and trustworthiness of the players who are offering you alliances, always bearing in mind that if it sounds too good to be true, it certainly is. Investigate, as best you can, the behaviour of your potential allies in previous games as part of assessing their credibility, veracity and trustworthiness. Remember that the strategic assessment of other players should be performed differently in a one-off game, as compared to a single game played as part of a tournament. In the latter case players know that their behaviour in early games will affect their ability to make alliances in later games; but that tis effect wears off slowly as the series continues.