Self-sustaining ecosystem and protection from long-range weapons such as particle beams.
As others have covered here, a self-sustaining ecosystem in an O'Neill Cylinder is difficult to produce, and requires constant maintenance. It may well be that living on planets is significantly less stressful for occupants, and may be preferred.
Another possibility, few really seem to have considered here is the wonderful ability kilometre after kilometre of atmosphere has to defend those living underneath them. It doesn't seem particularly unlikely that in our own future, and in that of a hard (or even firm) sci-fi universe weapons such as railguns and particle beams will be feasible technologies which can cheaply and effectively attack targets from distances measured in millions of kilometres, if not astronomical units. A good example of a cheap, long-range, one-shot killer would be something like a Casaba Howitzer concept, courtesy of Matterbeam. A single nuclear lance is, as that article describes, cheap to manufacture (especially for a spacefaring civilisation), devastatingly effective at long ranges, and unimpeded by even heavy spacecraft armour. Your fancy O'Neill Cylinder ain't looking so attractive a place to live when enemy combatants with cheap, mass-produced single-shot killers can slice it in twain, after all. But, as Matterbeam's blog dictates, the Casaba Howitzer can be stopped - atmospheres are incredibly effective against such weapons. This goes for pretty much any particle beam I can think of (that doesn't run on exotic physics like some kind of q-ball or strange quark gun) as well as any design of railgun that isn't inordinately expensive. The atmosphere simply absorbs all that energy.
Going on from this, if a paranoid government is involved, it may be that there's a benefit to keeping subjects confined to a planetary surface which can be covered not only by spy satellites, but also those capable of dropping "Rod From God" weapons from orbit, thus preventing some kind of major-scale uprising.
Another another reason might be using the entire planet as a heat sink. Some weapons, defensive or offensive, are simply not feasible to build in space (or sometimes, even on airless moons as there's little atmosphere to convect away heat buildup) but may be better built on planets, say using lakes or oceans to transfer heat away from a vast laser array, perhaps used as a weapon, perhaps used to accelerate lightsail craft to interstellar velocities. Alternatively, maybe vast computing needs also require considerable computational substrate and heat dispersal. Consider that the entire asteroid belt is estimated to be about 3-4% of the moon's mass - not bad, but if you're looking to build a galactic civilisation, maybe it is time to start thinking bigger. A gorgeous planet whose naturalist outer layers hide vast quantities of industry and computing power is certainly an attractive image in my mind, and one I'm currently toying with for a few short stories about future Earth.
Another possibility is as a status symbol - perhaps only the top 1% of the top 1% can afford to live on the relatively-rare habitable planets in your universe, being wealthy enough to also afford the cost have transferring themselves and any resources they desire up to or down from orbit. Alternatively, if structures such as Orbital Rings are common, it may be that the upper middle classes of your society live groundside, because they can afford to have goods shipped down to them, or get a flight up to planetary orbit for a line of profession that requires microgravity.
Lastly, maybe your setting's constructed physics places some limitation on such things. If FTL travel is restricted by gravity wells, and there's either no other way to interdict FTL objects, or it's terribly expensive, perhaps most non-military, non-corporate cities will use the mass of a planet or moon to protect themselves from vast armadas of DOOOOOOM.
Have fun :)
NIJNA EDIT: another possibility that occurred to me is that of truly enormous artificial habitats, such as Orbitals from Iain M. Banks' Culture series or a Ringworld from Larry Niven's, err... Ringworld series, might also be an option. Collossal enough that they feel like planets, generating gravity through spin over millions or tens of millions of kilometres, but also a vast testament to the hubris of man's works. Perhaps mixing and matching this with real planets might be an option, who knows?