I don't think my sense of humor has changed at all; I was born with this, for better or for worse.
Depending on where my self-confidence was, growing up, I would use humor either to bring people closer, or to keep them away from certain feelings I had.
I wore goofy hats to school and did musical theater. Most people thought I was a dork. But if you have a sense of humor about it, no one can bring you down.