If you have WordPress 3.5 this will work.
http://make.wordpress.org/core/2012/12/12/attachment-editing-now-with-full-post-edit-ui/
First you need to enable this in your theme, Put this in your functions.php file in your theme root.
add_action('init', 'wpse_77390_enable_media_categories' , 1);
function wpse_77390_enable_media_categories() {
register_taxonomy_for_object_type('category', 'attachment');
}
In your image.php or attachments.php file add:
$tax = get_the_term_list( $post->ID, 'category' );
echo $tax;
Then go and add some categories to a attachment.