Whether you're new to the neighborhood or the people next to you just moved in, introduce yourself. It may be a turn off or seem odd to some people, but there's a good chance they will be grateful and think it a kind gesture. Even if you don't become friends, being friendly on a regular basis can absolutely help diffuse any future problems.
When any issues arises, the first step is communication. Be careful in how you approach your neighbor. Avoid outright accusations, nasty notes, and assumptions. A face-to-face conversation is not the easiest way to tell your neighbor they're a nuisance, but it's often the most effective. Be sure to present a solution, not a problem. Let them know why you're concerned as well. Don't just tell them they're too loud. Explain to them that you have to get up early for work or have children napping. Whatever the situation, be reasonable and willing to compromise. Always avoid a heated confrontation. Be kind, casual, and pleasant.
Write a Letter
If you are unable to talk to your neighbor, try writing a kind letter. There is so much more room for misinterpretation here, so be careful in how you word your letter. Have a friend or spouse read it to ensure it conveys the proper tone and message. The same rules applies with a letter: do not make accusations and present a solution rather than a problem. End the letter with offering to talk in person even if you'd rather not.
Offer to Help
For the junky house or the eyesore yard, don't assume your neighbor is a lazy bones. Perhaps he or she just had back surgery and is unable to mow their lawn, or maybe they're lacking the proper tools. Offer your lawnmower or your help. If nothing else, it will get them thinking about taking action, especially f you've manage to make your offer in a non-condescending, truly helpful manner.
If communication doesn't solve the problem, check out your city's codes or HOA governing documents. If you live within an HOA, simply contacting the community manager may resolve the problem. Whether you contact your HOA or the local authorities, they are likely to send your neighbor a letter informing them of their violation. It is a good idea to keep a record of all such complaints.
Order a Survey
If it's an issue of property line, offer to split the cost of a survey with your concerned/concerning neighbor.
If there is a harassment issue or any safety concerns, contact the authorities and keep a record of all incidents. Although it may sounds extreme, consider installing a security camera. If ever necessary, you want to be able to present a detailed and accurate record of your dangerous neighbor's actions.