So many great fundamentals have been mentioned that underpin reasoning/rationale for places NOT to buy investment property in.
I stopped buying in Sydney some time ago. My last purchase was May 2012, so almost 3 years ago now. Defo wouldn't touch it right now.
Single-horse towns like the mining/resources dependent ones are an obvious no-go zone. The only exception that may be worth considering are single-horse towns that aren't mining dependent. Examples might be say agriculture-thriving towns (pockets of New Zealand are having mini town-population-booms as a result of workers moving in to get farming jobs for the thriving dairy farming industry developing there).
Even 'double' horse towns that are heavily mining and perhaps one other industry only, such as a local Goal or single major retail/business employer; could also be high-risk and ones to avoid.
Multi-faceted industry towns of populations ~30,000+ (IMHO anyway - happy to be challenged on this, as we all have different investment sub-goals, so just talking about what works for me here!); I think these present good buying opps, despite naysayers. There's some great towns of these around.
Can I also add a more personal one here (And again, this is just my personal strategy); but I tend to avoid all of Victoria not because I don't doubt several pockets will perform, long-term, but because of the ridiculously high stamp duty! When I do equity-releases at 90/10 LVRs (whilst capitalising LMI onto the loan!); to be slapped with a few more thousand $$$ of SD upfront; might not sound like much to most, BUT to me, this extra ~$3-5K or so of SD can make the difference between deciding between "1 property in VIC, or say 2 x slightly cheaper properties - with much cheaper SD - in another state".
Look, I know that Stamp Duty is scalable and tier-based in the various states, but overall I just can't seem to get VIC to stack up for me, so I tend to avoid the entire place. That said, I'll get to VIC eventually, once I max out my land tax thresholds per-state, in the other states I am taking interest in for my portfolio
Other than stamp duty and the above around multi-faceted industry locations; I also tend to value (like others have mentioned) a healthy "owner-occupier to tenancy" ratio in a town as an influencer on places not to buy in. I.e. towns where more than say 40-50% of stock are investor-owned rentals, don't favor too well in my book!