This phrase is often misused. It means: being able to perceive comical things.
However, it is often used to accuse others of a lack thereof when the person fails to laugh at someone else's expense. Or when the person fails to laugh WITH those who are laughing AT him.
Many if not most people say "sense of humor" when they mean "C'mon, let us have a little fun at your expense."
For example, Albert falls while trying a ballet pirouette. Just because his friends find it funny doesn't mean they should laugh. Why? Because real friends spare the feelings of their friends. However, it is OK to laugh if Albert gives them permission. How does he do this? By laughing at himself first.
"Albert, that fatty, fell while trying his ballet moves. We all started laughing. He didn't laugh because he has no sense of humor."