Hi BlackSmith,
They do all mean the same thing, that's true. It's not really a question of time, but rather formality. "What a pity" and "what a shame" are relatively formal, whereas "what a bummer" is more informal, and perhaps even slang.
They don't just mean you missed a good opportunity, but it is also used to show sympathy. For example:
- It rained the whole time we were in Paris, so we couldn't visit many of the tourist sites.
- Oh, what a pity! What a shame! Bummer! (or, What a bummer!)
Here, you understand how the other person feels.
Hope this helps!