This answer is mostly based on the United States electrical system, and the answer may vary depending on where you are.
The NEC code specifies that a solid copper wire used to connect to a ground rod must be at least either #6 or #8 gauge (depending on the size of your electrical service cable). #6 cable cable will always satisfy the sizing requirement, though in some cases larger is desirable. The NEC doesn't specify a limit as to the maximum length. Of course, shorter is better.
Aluminum cable is permissible with larger minimum sizes, though I'd avoid it due its corrosion properties.
The grounding system serves a few different purposes:
- Make the voltage of the land around your house be at approximately the same voltage as your power line neutral. This means that you can't shock yourself by holding an appliance in one hand and touching the earth with your feet.
- A fault path during lightning storms. When lightning strikes near your house, it energizes your electrical lines. Surge suppressors will try to shunt the voltage to the neutral or ground line. Having a good ground will maximize the power transfer out of your house.
- Safety. If the neutral going to your house is disconnected and you don't have a ground to neutral bond in your main panel, both prongs of each electric outlet in your house will have the full line voltage on it. Older appliances will connect their chassis to neutral, causing their chassis to hold 120V. With the grounding system properly connected, the ground will pull the neutral closer to 0 V, reducing the risk of shock.
- Radio antenna. Many radio antennas use the ground to help transmit their signals.
- Noise reduction. The power lines have a lot of "noise" on them. Having a good ground connection will reduce the noise that your equipment has to deal with.
So, what resistance to ground should you want? The smaller, the better. The electrical code states that with one ground rod, it must have a maximum resistance of 25 ohms to the earth. According to a Fluke brochure, you should try to have a ground to earth resistance of less than 25 ohms, or less than 5 ohms for sensitive electrical equipment.
#6 gauge solid copper is approx 0.4 ohm/thousand feet, so having a run of thirty feet will add minimal extra resistance (about 0.008 ohm). But, it will somewhat reduce the effectiveness of your system during a lightning storm. For the best lightning protection, your grounding wires should not have any sharp bends. This is because lightning is a very high frequency signal, and the wire's impedance increases with frequency. The 0.4 ohm/thousand feet figure is only valid at DC (zero frequency). While sharp bends do not increase the DC resistance, it does increase the high frequency impedance.
As far as a suggestion, for a "normal" house, I'd use solid #4 copper to two 8 foot long copper-plated ground rods which are placed 16 feet apart, and driven so that they are completely underground. Welding your ground wire to your ground rods is best (for example, with a product such as CadWeld's One Shot), but "Acorn" clamps are acceptable to use. The welded connection is more corrosion resistant than the mechanical clamp conection. Also, ensure that your water pipes are also attached to your grounding system. Your neutral should connect to the grounding system at the service entrance (generally the main breaker panel), and in no other location.
There is a limit on the length of the wire connecting a cable TV co-ax shield to your house's grounding system. It must be no more than 20 ft long, unless there is an additional ground rod (see NEC 220.100 for details), though I'm not sure if this would be the distance to your main panel, or to your ground rod.
There are many other rules that I have not mentioned (read the NEC book (NFPA 70) or your local code for details). As always, use caution when working around electrical systems.