1) If I return in a month, I can still quickly understand what the code does. 2) When I modify part of the code I can do it easily without modifying too much other parts of it. 3) Someone else reading my code, who has never seen it before can read and understand it easily.
One other thing to remember is that right code also depends on the project you are doing. What is right for a small quick app is not the same as what is right for a big entreprise application. If there are many people in a project then you may need to code in a more documented way, but the same thing will be overkill if you just test a simple feature.
A great place to learn is from open source projects. Some of them have lots of contributors and if they don't their code right, the project will become a mess. Learn from their practice and apply it.
My very last advice is no matter what you decide is right code, be consistent. Don't code one day in one way and the next day in another way.