We've been on 9 cruises, and have been upgraded twice. There seems to be no logic to who gets upgraded. The best rule is to book a cabin that you will be happy staying in. If you then get an upgrade, you consider it a bonus.
Sometimes, if the ship is close to full, you can purchase an upgrade at the port for less than it would have cost to book the higher category originally. Again, you cannot count on this as they frequently are full enough that they choose not to offer this option.
The only logic I've seen is that lower categories tend to be upgraded more often than higher...that enables Disney to continue to sell lower level cabins in an attempt to fill the ship as the sailing date approaches. Bottom line, there's no way you can count on an upgrade. Also, it can come at any time....ours was after documents came, and they just had us write in the new cabin number.