In chess, when is it appropriate to resign?
I once, in a serious tournament, in the very last round won a game when I was down a whole queen (at one point in the game - by the time I won I had recovered the queen and much more).

I had also before I eventually turned the position around to be clearly winning offered my opponent a draw, a draw which would have advanced him to a statewide individual tournament, but assuming he had a won game (which technically he did but over the board he failed to see how to win - in part because he ran into time trouble) he declined my draw offer.

My point is that even in a serious tournament situation I had not considered resigning in this specific position because the game was still highly dynamic and because since we had not yet met the time control conditions I still had a very real possibility of winning on time even if I was down in materials. 

So what more general advice can I offer?

1 - do not resign if the position is still highly dynamic - i.e. even if you are down in pieces you still have more than enough pieces to both technically win the game and have the ability to create counterthreats your opponent will need to deal with before they can win the game

2 - DO resign if you see a clear path to defeat - i.e. if you see a forced mate or a clear consolidation of the game such that your opponent has an overwhelming advantage. This is especially true if you have a lot of respect for your opponent's game - but even in a casual play you should probably resign when it is clear that you have lost. (i.e. when you could only get back into the game seriously if your opponent made major blunders).

In the game I cited above I won because due to persistant threats by my Knight and other pieces my opponent moved his king into a position where I was able to then fork his king and queen - and then proceed to capture many more pieces and come back from a seemingly insurmountable piece deficit to a clear and decisive victory. But I was able to do this because the position was highly fluid with lots of tactical options open to me even with the loss of my queen. It was a complex position, with both kings fairly advanced and I still had plenty of my own pieces and pawns to threaten my opponent with. Furthermore he was in significant time pressure due to a looming time control which we had not yet met - while I had more time on my clock (but still played quickly to keep the pressure on him) 

My general rule - resign when you can no longer learn from the game in casual play and in tournament play resign when you no longer have a realistic ability to make serious threats or eek out a draw (and don't forget to look at the clock's impact on play in tournaments)