Native New Yorker Here. Everyone is telling you the truth, the Times Square area is certainly sketchy at night, with open-air drug dealing, and petite larceny very frequent. I would recommend staying somewhere in Midtown East, or even better, near Central Park, in the high 40's/low 50's.
At the bare minimum, I would recommend spending as much time out early (8am) to about 7pm, and avoid going out late at night in the Midtown West area. It's just not a safe environment for tourists.
Midtown East is away from the Theater Area, but a very short ride away from everything. Same with locations by the park.