The mood one is in, timing/cadence of the joke, relatable experience or familiarity, cultural customs, age of the audience, and the likability of the person relaying the joke/story.
Alcohol/drug use and being surrounded by others laughing can also be a factor for many folks. Atmosphere matters!
Note: Everyone "laughs" at their bosses' jokes! :)