Note: I endorse Simanos's answer—especially as it covers flying, which is unreasonably and enormously complicated. However, as the question asks for a rules-as-written answer, this seemed relevant.
A creature can't intentionally fail a skill check, but a creature can try not to succeed on a skill check
I know that sounds like I'm splitting hairs, and, to a degree, I am, but choosing to fail isn't really a thing. When a creature has a choice whether to make a skill check, a creature can either make the skill check normally or not make the check. It takes a designer to step in and offer a third option: A creature can opt to give less than its all when making a skill check.
Sometimes a creature won't have the option to give less than its all—most skill checks made as reactions function in such a manner (for example, an attentive guard's Perception skill made in reaction to a ninja's Stealth skill check or a wary police detective's Sense Motive skill check made in reaction to a suspect's Bluff skill check). A creature can make the check more difficult for itself—perhaps by deliberately penalizing its Listen, Spot, or Perception skill checks with a cell phone, earplugs, a blindfold, or cologne, or deliberately penalizing its Sense Motive skill check by chugging booze and smoking hallucinogens—, but such measures are usually undertaken well before the check-that's-a-reaction is made and not something the creature can do in response to having to make—that is, in response to being forced by the game system to make—the skill check.
On the other hand, a skill check a creature can choose to make isn't failed by not making it. Instead, the skill check's result is unknown because the task remains untried. For example, if the GM says, "To reach the top of Mount Doom-doom-doom ('We're thrice doomed!'), Egaad the Unsturdy must make 279 successful Climb skill checks (DC 134)," Egaad's player can (and probably should) say, "That's stupid, and Egaad's not doing that," and Egaad'll suffer the consequences—if any—for his choice. That's not failing 279 Climb skill checks (which, if it were, would suck and be weird); instead, that's just not making a ridiculous number of Climb skill checks.
But between those extremes, at least one of the game's designers allows more granularity than just the bog standard of roll, take 10, and take 20. In the Dragon #311 Dungeoncraft column "Dungeon Adventure, Part III: The Inhabitants," Monte Cook includes this sidebar:
…An NPC guard makes a Listen check because he's on duty, alert, and expecting trouble, but what about NPCs who are not alert? What about a room full of bandits playing cards? Surely they don't deserve the same kind of Listen check as the alert guard.
To simulate this, you can assume that all guards take 10 on their Listen checks and that other inhabitants who are not actively being "alert" take 0. "Taking 0" is just like taking 10. You assume that the character taking 0 got a 0 result on the die because he wasn't even trying. However, when the DC is low, or when skill bonuses are high, taking 0 can still result in a lot of success. It allows you [the DM] to determine at which point someone who isn't paying any attention might still hear something (or Spot something).
You can do something similar with sleeping characters, but instead of taking 0, they take −10. (97)
Emphasis mine. (For context, Monte Cook is one of the authors of Dungeons and Dragons, Third Edition—specifically, he gets the primary writing credit for the Dungeon Master's Guide (2000)—, and that's the game upon which the Dungeons and Dragons 3.5 revision is based and that's the game upon which Pathfinder is based.)
So while this sidebar concerns itself primarily with on- and off-duty guards making Listen checks, the idea of taking 0 ("Meh") or even taking −10 ("I can do this in my sleep!") is endorsed by one of the game's designers. And, by extension, a generous GM could rule that a creature could take even less than −10, instead taking −20 ("I could do this dead!") or even taking −30 ("I could do this if I never existed!" …or something). By the same token, a GM can rule that a creature deliberately opting to make a skill check by rolling the die can further opt not to try and suffer a −10 penalty (or worse) on the check.
Thus a creature that chooses to make a skill check at all can't intentionally and absolutely fail the skill check, but the GM may allow the creature making such a check to put forth so so little effort that a result of less than the necessary DC is nearly guaranteed, which, in the end, will look to outsiders a whole lot like intentional failure.