Any place that's protected from the glare and heat of the sun is shady, as in a "shady nook." But as its darkened nature implies, shady has the equally popular meaning of "suspicious, dangerous, or deceitful." A "shady character" is up to no good.
The metaphorical meaning of shady has long been embraced by slang. Since at least the 1950's, the phrase "got it made in the shade" means having a great and easy life or job (picture eastern sultans being shaded by servants holding giant leaves). The rap sultan Eminem calls his evil alter-ego "Slim Shady," conjuring up a devilish suggestion of the Prince of Darkness himself — someone who definitely lives in a shady neighborhood.