In recent versions of WordPress it’s been possible to add a body class using <body <?php body_class(); ?>>. This provides lots of useful classes for styling, but it doesn’t show the category on a single post. A couple of years ago WordPress forum member eastwoodarts posted an elegant snippet that can be added to functions.php:

add_filter('body_class','add_category_to_single');
function add_category_to_single($classes, $class) {
	if (is_single() ) {
	global $post;
	foreach((get_the_category($post->ID)) as $category) {
		echo $category->cat_name . ' ';
		// add category slug to the $classes array
		$classes[] = 'category-'.$category->slug;
		}
	}
	// return the $classes array
	return $classes;
 }