As with most cruise lines, you may increase your odds of receiving an upgrade on a Princess cruise ship by booking early, traveling frequently and sailing in the off-season when there are more empty cabins to upgrade you into. But don't stop yet -- there are a few more tricks you can use to pad your odds of getting a cabin upgrade.
Princess offers complimentary automatic upgrades for passengers booking through a travel agent. This isn't a guaranteed upgrade; think of it as getting in line for the possibility of an upgrade. Your travel agent can put some limits on which type of upgrade you're willing to accept or preemptively decline upgrades entirely if you are traveling in a group and don't want to be separated from the others.
Even if you don't have a travel agent, try booking a "guarantee" or "to be assigned" cabin. Many cruise lines, including Princess, sometimes overbook inexpensive cabins with a guarantee that you get the type of cabin you paid for, or better; so some of those overbooked passengers get a free upgrade. The downside is that there's no guarantee you'll be the one picked for an upgrade and you may not know which cabin you're sailing in until the last minute.