There are many different positions where moving a pawn two squares is to your advantage so it's really not that easy to respond other than to say "when the position calls for it". Two square pawn moves are often good during pawn storms or when claiming space.
One that is worth noting, though, is that in the endgame it's often advantageous to have the ability to move a pawn one or two squares when your opponent does not. It basically gives you control over who's move it is at the end of a sequence of pawn pushes by moving either one or two squares -- I'm sorry I don't have a good position to illustrate this -- maybe someone else can post one.
The other time it's obviously to your advantage is also in the endgame when it moves your pawn outside of the square of your opponents King and guarantees promotion (just be sure to remember this when calculating the position from the other side).
The little guys can be so annoying but so crucial in the endgame and set up in the opening so my question is - when would you want to move a pawn up 2 squares other than to start the game? I think pawns are a crucial point in defense so why would you risk that structure to move into the open part of the board? Thank you!
Cub