Update: 10/15/10
Good news everyone! (Cue Professor Farnsworth voiceover). The first big Civ V patch should be arriving sometime next week. As listed on the official forums here
Economy - Can now sell Buildings in a
city (to help lower maintenance for
obsolete buildings later in the game).
Start Original Answer:
Buildings are not currently sellable in civilization V. The only way to remove a building from a city is to have that city be conquered (which isn't generally a viable option).
It is hoped that there will eventually be a patch to allow for this, if for nothing else than to nuke annexed puppet-states useless barracks, armory, etc.
Regular Buildings
With most regular buildings it's pretty obvious what their role is, and building a more advanced building requires the less advanced one, so you don't have much choice anyway. For example, it's obvious a Stock Exchange is important for a money-specializing city, but you can't have a Stock Exchange without a Bank and you can't have a Bank without a Market, etc. So as far as regular buildings are concerned, you just need to build the buildings in the chain you are specializing in.
However, some location- and resource-dependent buildings - like Windmill or Mint - can be of great help. It's a bit hard to recommend them, though, because they depend on the location of the city and what's around it. If you are able to, it's usually good to build them as soon as possible. In addition, it's important to take them into consideration when you choose where to build the city.
World Wonders
Most wonders have a global effect so it doesn't matter where you build them. The exceptions are the Colossus, of course, as well as wonders that do give a lot of something to the containing city (e.g. Himeji Castle with its +4 culture). There aren't a lot of these, though, and the effects aren't huge.
National Wonders
Unlike world wonders, national wonders do have city-specific effects, and they can be a real boon for specialized cities. After the latest patch national wonders like the National Treasury, National College and Ironworks provide a significant bonus to their respective attribute, so choosing carefully where to build them can have a significant result.
Best Answer
The building will still have its normal effect without assigning people to it. In this case, a bank with no merchant will still add +25% gold.
Specialist slots just give you the option of creating a specialist in that building. They won't directly affect how effective the building is but they do produce resources and, more importantly, great person points.