"Watashi" is the general formal form of "I" applicable for both genders, while "boku" is the colloquial form for male.
Application of each form depends on the formality of conversation context, especially social class differences. For instance, a man speaking with his superior or even acquaintance should use "watashi" instead of "boku".
Misuse of polite form might make one looks rather standoffish. But colloquial form in a wrong context could be interpreted as impertinence or even insult.
Just my two cents.
^^