I've lived in the Phoenix-metro area since 2004. I've only been down to Tucson a handful of times and it seems like a much smaller version of Phoenix, though charming in its own strange kind of way...
Anyway, virtually all of downtown Phoenix is, in my honest opinion, a dump. You'd have to see it for yourself I suppose but I certainly wouldn't want to live there. Northern Phoenix, however, does have some pretty nice neighborhoods. If you can afford it, I suggest you do what I and many others do: live in one of the suburbs and commute into Phoenix for work if necessary. Some of the cities/towns that I know fairly well and have yet to see any neighborhoods that I would call crappy or shady would be Queen Creek, San Tan Valley, Gilbert, Surprise, Avondale, Goodyear, Scottsdale, and Paradise Valley. Good luck finding something affordable in the latter. Others that have plenty of good neighborhoods, yet have some not-so-nice ones (again, from what I have actually seen with my own two eyes) are Mesa, Tempe, Chandler, Glendale, and Peoria. I'm probably missing some, but that's what readily comes to mind.
Again, in virtually every locale, its pretty common to find a ghetto in one area and paradise in another. I've lived in some of the aforementioned communities in fairly nice neighborhoods, yet I could easily have driven a mile down the road to a ghetto. Best advice I can give you is to look up these cities/towns on MapQuest and then come for a visit and scout out some neighborhoods/apartment complexes.
Hope this info/advice helps and feel free to ask me any more questions, whether here or via personal message. Either way, good luck.