Whenever I play support I always find myself wandering aimlessly when I'm not either shadowing my ADC or engaged in team fights. What should I do when I'm not doing either of these things?
This depends on what part of the game you're in.
During laning, if your ADC went back to heal or buy and won't make it back to lane in time to kill the current minion wave, then go ahead and last-hit those minions yourself. It's much better than wasting the gold. You can also leave lane briefly to ward nearby brushes and such to make your lane safer.
In the later game, your job is vision control. Make sure that you can see baron and dragon if they're close to coming back up, and that the enemy team can't. If you can, try to get vision a little bit past your safe front, so that you can see what the enemies are up to. Whenever your teammates aren't around to support, your job is to control vision (including denying your opponents' vision) without feeding the enemy team.
I'm a main support player and I can tell you: there are times where you will seem "useless". But note the word seem. The supporter is arguably the best position in the team for awareness and play making. It's your job to keep an overview of the whole game since you are the one that only comes to action when you're about to kill something. Top/Mid and Adc will have to worry about CS while the jungler has to control his jungletimers and ganks (although the jungler is also very good at awareness).
Note also that there are 2 types of supporters:
As a harrassing supporter like Lulu/Annie/Thresh you will be focussing more on denying the enemy Adc farm or as already mentioned you try to harass him.
As a Passive or PassiveAggressive supporter you will either only safe the hp bar of your adc (Soraka/Sona) or in the case of an PassiveAggressive supporter you will only go in when You're about to make a kill or you gotta save someone (Leona/Blitzcrank/Alistar).
Keeping an eye on the map is of course easiest when playing as an Passive(Aggressive) Supporter, but this also includes the "I'm bored" or "I'm useless" moments.
For when your ADC backs off his lane you can go back aswell and spend your gold on wards/items, you can stay and CS so no creeps get lost or you can Gank other lanes. Since most supporters have really high amount of CC or Utility a gank can be fatal. Especially when combined with your jungler. A triple gank mid with Nocturne, Leona and Brand is really hard to survive unless everyone of these 3 misses their skillshots.
The ganking part can also be applied when your adc is really bad. If you think kills on your Adc will be useless since he can't position himself late just gank mid. Try to figure out who can carry this game.
Oh and last thing of course to do: Ward ward ward. One of your main jobs as a supporter (I don't like it either...)
This will depends the time of game mostly, and the situation.
ADC back, two enemies pushing. In this situation, you won't (most probably) be able to hold the lane alone. So either you hug tower and try to clear the wave as efficiently as possible (fast & with as many last hit as possible), or you can decide to back and leave it to the enemies. This decision should be weighted with the following questions: is the tower full life (can it take a few hits/will it fall no matter what I do?)? will they dive me and get a free kill? Can I clear the wave really quickly? Will I take advantage of shopping now? If you think you will get better advantage from going back home that leaving, do it.
ADC back, opponents back as well. Go shop! This is usually the time to get your items. If you don't have any gold, get the last hit and experience your AD won't have. You can also try to help the jungler if he's around, or getting counter jungled by warding stategic points like dragon, red/blue buff. If you feel confident you can get a decisive advantage, going for another lane and gank is a possibility as well.
If your AD backs with a full pushed lane, you probably want to go back as well, because you are basically a free kill.
The further the game goes, your actions should change. Still keep an eye for objectives, ward red, ward blue and your key spots. If you still have time, why not clear some unattended wave, or jungle camps. They respawn quickly enough not to hinder your jungler. Maybe it's a good time to start damaging blue/red for you carries. Beware of going warding alone, you always risk getting caught and get your team into trouble. Vision is important, but being alive is too. Always weight your decisions.