Add category selection to custom post type (plugin)

Alternatively to Kaiser’s answer, when you register the post type, simply use the taxonomies attribute:

register_post_type( 'my-cpt', array(
  ...
  'taxonomies' => array( 'category' ),
  ...
) );

Details on register_post_type() can be found here in Codex.