how to display featured image for single post for a specific category

is_category checks whether or not the current page is the Archive Page for the specified category, not if the current post is in the category. You want in_category.

/* Code to Display Featured Image on top of the post */

add_action( 'genesis_before_entry', 'featured_post_image', 8 );
function featured_post_image() {
  if ( ! is_singular( 'post' ) )  return;
  if ( in_category( 31 ) ) {
    the_post_thumbnail( 'post-image' );
  }
}