First, it's probably a good thing to distinguish between sanitizing an sterilizing. We're not sterilizing in homebrewing, we're sanitizing...which is much easier.
The most commonly used sanitizing agents are bleach, iodophor, and Star San. I use Star San.
Sanitizing bottles very far in advance is probably inadvisable, as the bottles may become contaminated, despite the homebrewer's best efforts.
I sanitize the day before I bottle. My process is twofold:
1. I squirt Star San solution up into each bottle with a vinator (a pump designed to spray sanitizer up into wine bottles; this is a great little piece of equipment, and I wouldn't be without it).
2. As I spray the Star San into each bottle, the bottle is placed upside down in the dishwasher and left there overnight. When I get up in the mornign, I run the dishwasher, which sanitizes the outside of the bottles. By the time I'm ready to bottle, the bottles are ready to go.
There are many ways of doing this process, I was just looking for a simple and effective method. This works for me.
Note: My process requires no cleaning (different from sanitizing) of the bottles, because all my bottles are rinsed thoroughly at the time the beer is poured. If the residues and sediment of the beer is allowed to dry in the bottle, then a completely separate cleaning process needs to be employed, either using brushes and cleaner, or soaking in a product like PBW or Oxi-Clean, followed by a thorough rinse.