How to make classes for posts?

Use ‘post_class‘ for custom CSS per post.

An example with 3 variations (only use 1):

 <div id="post-<?php the_ID(); ?>" class="red box" ?>>  //idea 1
 <div id="post-<?php the_ID(); ?>" <?php post_class('box-color'); ?>> //idea 2
 <div id="box-color" <?php post_class(); ?>> //idea 3

<h3>Header</h3>
Content
</div>

To be able to choose a color in the post, use a custom field conditional.
http://codex.wordpress.org/Custom_Fields

To just change it based on category and such wrap the post class examples above in a category conditional.
http://codex.wordpress.org/Conditional_Tags#A_Category_Page

The logic ( not proper code but ya):

     if in_category( array( 1,2,3 ) ) { 
       // add your custom post class div 
     }else{
        // use default post class style.