From LQWiki
In old Westerns, you would be able to tell apart the good guys and the bad guys by the colour of hat they were wearing. The bad guys wore black hats.
Thus a bad hacker is referred to as being a black hat, meaning a bad guy. This cracker often breaks into systems with malicious intent for self gain.

This page is available under a