"Captain, they have locked on phasers."
"Shields up! Go to red alert."
It makes sense that the captain would be the one who decides to go to red alert — and, for that matter, who makes tactical decisions regarding the shields. (As the answers to this question suggest, automated responses aren't necessarily dependable under all circumstances.)
My question is... why aren't the shields up all the time unless there's a reason for them not to be? Shields don't preclude maneuverability, communications, sensors, weapons use... pretty much anything except transporting, landing a shuttlecraft, and getting shot. And presumably there's a range of situations in which the ship could be damaged before the captain could get two syllables in, and before the security officer could get two LCARS pokes in.
The out-of-universe reasoning is obvious: ordering the shields to be activated allows the captain to inform the audience, in no uncertain terms, that s___ just got real. But is there an in-universe justification? A reason that shields on a starship should be raised as necessary, rather than lowered as necessary?
The deflector system utilizes one or more graviton polarity source generators whose output is phase-synchronized through a series of subspace field distortion amplifiers.... Heat dissipation on each generator is provided by a pair of liquid helium coolant loops with a continuous-duty rating of 750,000 MJ. Four backup generators are located in each hull, providing up to twenty-four hours of service at 65% of nominal rated power.
And, pure speculation here: It may also be due to the same reason away teams don't wear protective gear, Starfleet is of peaceful exploration, it doesn't really help your case when if you're talking to a Klingon bird of prey that your shields are raised, like you're expecting them to suddenly attack.
Federation starships despite their appearance of near-infinite energy, expend the bulk of that energy in four ways: offensive weapons, defensive shielding, energy manipulation on-board ship for environmental controls, internal gravity, inertial dampeners and maintaining mobility through the use of the warp drive engines. Of the four, defense utilizes a great deal of the energy generated.
Technically, the shields are always up albeit in a reduced energy configuration. The deflector array is always in operation as long as the ship is in space, deflecting particles of matter which could have disastrous effects on the ship or its crew. This technology is commonly known as the navigational deflector.
The navigational deflector (also known just as the deflector, the deflector array, the deflector dish, the main deflector or the nav deflector for short) was a component of many starships, and was used to deflect space debris, asteroids, microscopic particles and other objects that might have collided with the ship. At warp speed the deflector was virtually indispensable for most starships as even the most minute particle could cause serious damage to a ship when it was traveling at superluminal velocities.
This low-intensity shielding, however is not the same as the main shields which protect the ship against attacks from spaceships and other potential threats. These shields require an enormous power drain on the ship's energy supplies and are thus only utilized when the ship is under attack, in an extreme environment, or attempting to prevent transporter-based technology from entering the ship.
Since the drain on ship's power is both considerable and requires significant crew to manage and maintain power management, raising the deflector screens to a defensive posture requires a call to red alert to bring out the proper crew and to set the ship up for proper emergency energy management.
As can be seen almost every few episodes, raising one's shields is generally seen as an aggressive move. All races do it only whenever a battle is imminent.
The Federation, in contrast to most other greater empires, is focused on exploration and peace. Flying around in a state of combat readiness is not something that tells people "we come in peace" but more "get ready, whenever our sensors detect you, we will attack you".
This is directly supported in Star Trek: The Motion Picture through this exchange while the Enterprise is approaching V'ger:
CHEKOV: Should I go to battle stations, sir?
KIRK: Negative, We'll take no provocative action.
DECKER: Recommend defensive posture, screens and shields.
KIRK: No, Mister Decker, ...that could also be misinterpreted as hostile.
If we compare permanently having shields with modern day ship warfare, you could say "the Federation ship has their ECM set to full and a target lock on us, but their weapons are not ready, yet."
Thus energy consumption aside, it is not something the Federation wants to do because it projects the wrong image about them and their intentions.
A shield frequency, shield harmonic, or shield modulation refers to the frequency settings of the shield emitters on a particular starship. If an enemy force were to obtain this frequency, they can modify their weapons to bypass the shields entirely. (Star Trek Generations) Shield functionality can be regained by remodulating the shields. (VOY: "Equinox, Part II") In order for two starships to merge their shield envelopes, the frequencies of their shields must be matched. (VOY: "Equinox") Federation shield frequencies operate in the Megahertz ranges. (Star Trek Generations)
In less than ideal sensor conditions, a ship can be identified by the pattern of its shield harmonics. (VOY: "Innocence")
In 2366, when the non-corporeal Koinonians drained antimatter from the antimatter pods to use it as energy to create their replica of Marla Aster, it was stopped by increasing the shield harmonics to match the antimatter containment effectively severing the Koinonian beam. (TNG: "The Bonding")
In 2371, Lursa and B'Etor were able to inflict severe damage on the USS Enterprise-D after learning its shield frequencies through modifications of Geordi La Forge's VISOR. They were then able to adjust their Bird-of-Prey's disruptors and torpedoes to pass through the Enterprise's shields. (Star Trek Generations)
The Vidiian starship that attacked the USS Voyager in 2371 was capable of continuously matching Voyager's shield frequencies, allowing them to clamp directly onto the hull. (VOY: "Fury")
In 2372, a shuttlecraft piloted by Tom Paris penetrated the shields of a Pralor starship by matching shield harmonics with those of the Pralor subspace defense field. (VOY: "Prototype")
In 2375, One, an advanced Borg drone with 29th century technology, remodulated Voyager's shields to break the ship free of a Borg sphere's tractor beam. (VOY: "Drone")
Later that year, Lieutenant Commander Tuvok developed a new shield modulation which was hoped would be effective against the weapons of Devore warships. (VOY: "Counterpoint")
In 2376, the USS Equinox successfully engaged the USS Voyager after learning its shield frequencies. Although Voyager remodulated its shields several times, each time the new frequencies were passed to the Equinox by their EMH, which had been switched with that of Voyager. (VOY: "Equinox, Part II")
While aboard a Borg installation, Janeway monitored the shield modulation of a Borg drone as it passed through one of the ship's internal force field. By adjusting her bio-dampener to the modulation of 324.95 she was able to walk through the force field, however her bio-dampener was destroyed in the process. (VOY: "Dark Frontier")
As previously stated, all shield generators have a duty cycle. After this duty cycle it us mandatory for the units to go through a cooldown process. The deflector shields actually ARE up continuously: I believe the stated power level is somewhere between 5 and 15% of full strength. This is to protect the crew from radiation and small debris. The main navigational deflector dish clears the ship's path of larger objects. Furthermore, having the shields always raised at full strength interferes with several sensors used for scientific purposes. The Technical Manual states that fact, and states that "sensor windows" are periodically opened in the shields, but that the results obtained by scanning through these "windows" are of reduced quality. Think of it like this: the reason the Hubble telescope is mounted on a satellite is because it will get a clearer picture. If it was on earth, the atmosphere would interfere with image clarity.