Although the media portrays hackers as malicious computer programmers, it doesn't actually take as much know-how as one might expect to violate computer hacking laws. For starters, merely accessing another person's e-mail or social media accounts without authorization violates a decades-old federal law, and can also violate state and local criminal laws.
However, not all hacking is malicious or illegal. There are many "hackers" that are actually working to improve software, improve security, and generally do good things. What will make hacking a computer or device a crime depends largely on the type of hacking and the ownership of the device or computer.
Your Devices Are Hackable
Over the past decade, there has been much debate over whether consumers can hack their own devices. Manufacturers strongly opposed this practice and attempted to stop hackers from modifying devices and distributing code to modify others' devices.
While the penalties for doing so were generally civil in nature, this topic raised awareness of the positive hacker community. It shined a light on the people who were trying to make devices better by providing software patches, extensions, and new programs. Now, for the next two years, with some limited exceptions (and loss of warranties), it is completely legal to hack a device you own.
Other People's Devices and Computers Are Not Hackable
The law basically draws the line at your own computers and devices, as well as those that you're explicitly authorized to access. Under federal law, the unauthorized access of another person's computer or device can be grounds for criminal charges. This includes guessing someone's password, and even just using an account that someone inadvertently forgot to log out from.
There are additional charges that can potentially be brought under both state and federal law depending on what is done once unauthorized access has been achieved. Frequently, hacking crimes include stalking, theft, identity theft, extortion and harassment. Penalties for violating federal hacking laws can be extraordinarily harsh and frequently includes jail time.