I have some dedicated servers which are not used at the moment. However this can change on a weekly basis. Would it be useful to the Tor network for me to configure them as relays during the times they are not used for other purposes? If so, should they be bridges or relays?
The short answer is:
Yes. All bandwidth is helpful.
The long answer is:
Sortof. At first your relay is more or less untrusted. For the first 3 days or so it is in the 'unmeasured' phase (roughly no use). If your relays are going to be up for less than 3 days, they probably don't do much good. On days 3–8 your load slowly ramps up; so it's probably okay to have a realy if it's going to be running for longer than 3 days. However, the load isn't fully utilized until after day 68+ (at which point you're a guard relay).
For more information, see this blog post.
TL;DR — If your relays will be online for 4+ days you're probably doing some good; otherwise it's not worth your time.
In addition to Sam Whited's answer, short-term bridges are mostly useless. They'd be better off as normal relays.
Bridges are generally handed out by the Tor Project on a small scale. So the address may not be given out to someone in need for quite a while. Especially as they try to ration new bridges so that they go unblocked for as long as possible.
Of course, if you yourself directly give your Bridge address to another Tor user, it can be used straight away - just make sure to tell them when you expect it to stop working!
If you want to contribute resources to the network that will only be available for a short period, consider Flash Proxies, which were designed to help use Tor for censorship circumvention with short-lived resources specifically in mind. Flash proxies aren't relays per se, but run in your web browser and convey traffic to a relay for clients that are set up to use them.
Even if you cannot contribute any sort of network resource, you can still contribute money that will be used to pay operating costs for running relays. See, for example, https://www.torservers.net/
In addition to Sam's answer I thought I'd share my experience with starting up a new high bandwidth relay:
It is true that your relay starts slowly. You can read about the background here:
Remember how I said the bwauths adjust your consensus weight based on how you compare to similarly-sized relays? At the beginning of this phase your relay hasn't seen much traffic, so your peers are the other relays who haven't seen (or can't handle) much traffic. Over time though, a few clients will build circuits through your relay and push some traffic, and the passive bandwidth measurement will provide a new larger estimate. Now the bwauths will compare you to your new (faster) peers, giving you a larger consensus weight, thus driving more clients to use you, in turn raising your bandwidth estimate, and so on.
There is a process however to speed up this process. If you have another machine with large downstream available e.g. your dialup you can install the tor client and configure your own relay as Entry Node in
EntryNodes <Your relay's fingerprint>
Then just start a few large downloads and let them run for a few hours. This will allow your relay to peer with higher bandwidth nodes and quickly increase the amount of traffic flowing through your relay.
I was able to ramp up to steady 200MBit/s saturation within 6 days after giving a "jumpstart" like described above for ~10 hours for the first two days of uptime.