I know what gears do what (what makes pedaling easier or harder), but my sister and I are having a debate on when exactly to shift. I think I read somewhere that it is better to shift when coasting or lightly pedaling and before the obstacle you are shifting to do better on. Sadly, I can't find the source so I have no proof to show her, she believes it doesn't matter when you shift it but it is better to do it while pedaling. Does anyone know which is correct?
It depends on your transmission. Some internal gear hubs, for example, are perfectly happy being shifted at a standstill.
For a derailleur based system, you should shift while in motion while pedaling lightly. It isn't ideal to shift under load, and shifts will be sloppier under load typically.
The question of when to shift while riding is a matter of personal preference -- ideally, you want to maintain your cadence or power output, but due to obstacles, you might downshift and get into an appropriate pedal position for continuing riding. It's like shifting in a car -- there are certainly wrong ways, but there isn't necessarily a right way.
For example, if I need to round a corner and slow down before, I might shift down before the corner, get the pedals in a position I can round the corner without striking the pedals on the ground, go around and start pedaling again. But I could also get the pedals in position, slow down, come out the other side and downshift and continue going. Neither of these is wrong, but the first one is likely easier.
It's also a good habit for coming to a stop and starting -- starting in a high gear is not so nice, and shifting down can be a bit jarring unless you build up a bit of speed in the high gear.
"shifting under load" is considered worse for the drive train, but if you have to do it then its not the end of the world. Shifting halfway up a climb is okay, but you do have to back-off the pedal pressure for a half-revolution. This is the same for Derailleur and IGB bikes when shifting to a bigger/easier cog.
Derailleur bikes can't shift while coasting, you have to be moving the chain to shift it. Internally Geared Hubs can shift while coasting or stopped.
When to shift should be to keep your pedal revolutions in a comfortable range. For most people that's somewhere between 60 and 90 RPM, with higher values for speedy types.
Internal gear hubs can shift while standing still but suffer when shifting under load - ease off on the pedals to shift. Derailleurs require the pedals to be turning forwards in order to shift properly. While avoiding shifting under load is strongly recommended due to wear on the components and possible irregularities (I learnt this lesson the hard way long ago - I was standing on the pedals to get up a sudden steep climb and the chain fell off when I tried to down shift), the rear derailleur handles shifting under load reasonably well. There are other, more exotic, shifting mechanism which I will not attempt to list here.
The key thing to remember is to shift down before you absolutely need the lower gear. If you shift too late, you will find you cannot stop pedaling to shift, because you are already going too slow, and you cannot speed up because the gear is too hard. On the other hand, shifting up too late is rarely a problem.
In short: shift down before you need the lower gear and shift up only after the previous gear starts being too low.