It's kind of a sexual reference. Person #1 says something that is not sexual, but you might hear a woman say when a man is naked, or when she is having sex with a man. Person #2 takes this innocent comment, and turns it into a sexual joke.
Pretend like two people are looking at something very large, anything large, a large television.
Person #1: It's so big!
Person #2: That's what she said! (When she saw my penis)
You also might hear a man say it after someone says something is too big, and it will not fit. Or after someone says something is very long, very big. That's all I can think of off the top of my head right now.