The phrase is used to mean “How is this relevant to the conversation?”, especially if a person seems to be actively avoiding the topic being discussed.
Me: Hey, do you have that $20 bucks you owe me.
Him: Hey, have you seen the movie Hot Tub Time Machine yet?.
Me: What's that got to do with the price of cheese in China?
While our lifespan is the number of years we will live, our healthspan is the number of healthy years we will have and our sexspan is is the number of years we will continue to be healthy enough to continue having an active sex life.
A lighthearted reaction upon receiving disappointing news of some sort. Usually something that isn't a particularly a big deal, esp. when it primarily affects someone else - sort of a mild schadenfreude. Sometimes doubled or tripled, and possibly said in a sing-songy voice for added comedic effect to imitate a muted trumpet, which is how the meme originated.