This expression has been sung in songs (I think it was by Eminem) and said by a few famous people which actually does not have to do with real panties, which means that it is a figurative expression. As a figurative expression, the meaning that the speaker tries to convey is that for the listener or those who he or she is directing the words to is for them to not let their mind be too worried about a particular matter. In short, the message is "do not worry about this matter".
However, being the inquisitive mind that I am, I would like to dissect what the expression means (I love dissecting, you should see those things that I have dissected and never put back together). The expression of course comes from a lady's panties being bunch up during the course of them wearing it making them a bit uncomfortable and fidgetting around. Apply that scenario to the mind is an inquisitive mind which wants to know an answer to a burning question (which is another expression altogether). So, panties in bunch is something which your mind wants an answer to.
Why is panties in bunch used to describe what I have try explain in the paragraph above. Ever have your panties in bunch? It is not very comfortable is it? It can get between the crack of your ass and you try to do the impossible movement of trying to get it out using whatever muscle is there (is it the pelvic?) but after much attempt it is just frustatingly unsuccessful. If you are a man, you will just pull whatever it was that made you uncomfortable (as you can see I use the analogy of panties to describe underwear for both man and woman, though panties are usually worn by women, in general). If you are a woman, you may go to the loo and do it discreetly there although I have seen those who do it in public places as if she was trying to get something out of a small hole (which maybe true to some extent, you get thei idea)
So, ever had your panties in a bunch? Figuratively or otherwise?