The phrase often suggests a hypothetical or non-realistic situation used for comparison. In an ideal world, I'd have a private jet to avoid traffic.
Pro Tip 2/3
Expressing Desire
Use it to express what you wish would happen, knowing that it's unlikely or impractical. In a perfect world, all children would have access to free education.
Pro Tip 3/3
Contrasting Reality
It's often used to contrast an imperfect current situation with a desirable, but unreachable, alternative. In an ideal world, we would not need to work overtime.