Meaning: If someone has the best of both worlds, he or she benefits from two different things.
Examples:
If we go there, we will be able to swim in the sea, and go hiking in the woods. We will have the best of both worlds.
I love eating junk food and being thin. It's a pitty I can't have the best of both worlds.
Meaning: Life goes on, it is not so bad or serious:
Come on! It's not the end of the world. You will meet other girls
You have not won the tournament, but it's not the end of the world. You can try again next year