Mexico city has a bad reputation, safety wise, but this seems over hyped; it's all been very safe in our experience anyway. It's a huge city with plenty to do an a very benign climate with moderate temperatures and low humidity. Transport is cheap and easy (the metro is three pesos per trip, about $0.25, busses are only a little more), although somewhat packed. Also, being a big city, there's an enormous range of eateries available, with all of the Mexican staples and a huge range of international cuisine as well.
Although the Centro Historico and Zona Rosa are popular locations due to their convenience, they're not the nicest places to stay; if you've got a little time, then I'd recommend Roma or Condessa instead, they're much more pleasant places, green, leafy and with much more character.