This phrase describes changing your priorities to place high value on the correct things.
Your "priorities" are the things that you think are important. You can think of your priorities as a list, with the items at the top of the list being most important, the next items being less important, and the items at the bottom of the list being unimportant.
Many people put their family at the top of this list, followed by friends, work, then things like their hobbies. If you act in a way that shows that your priorities match this ideal, people will say that you "have your priorities in order". If you show that you value something else, like money or fame, higher than your family and friends, people will say that you "need to get your priorities straight".