First, you want to get the tags that the post in question already has. To do this, use <?php wp_get_post_tags( $post_id, $args ) ?>
Then use WP_Query to grab the posts that have the tag in question:
$query = new WP_Query( '$post_id' );
Here is a sample of how it might work by creating a shortcode to put in your sidebar:
**
* List Posts by tag.
*
* By Matt McFarland 10/23/2013
* Use as a shortcode [posts_by_tag tag_id={TAG ID} or tag_slug = {SLUG}]
* Available options are in the shortcode_atts below, non-empty is default
* examples
* [posts_by_tag amount="4" tag="cars"]
* [posts_by_tag amount="6" tag_id="34"]
* [posts_by_tag tag="cars"] (amount is 6 by default)
*/
add_shortcode('posts_by_tag','mm_list_posts_by_tag');
function mm_list_posts_by_tag($atts) {
ob_start();
extract( shortcode_atts( array(
'amount' => '6',
'tag' => '',
'tag_id' => '',
'orderby' => 'post_date',
'order' => 'DESC',
'key' => '',
'meta_key' => '',
'post_type' => 'post',
'post_status' => 'publish',
), $atts ) );
$args = array(
'posts_per_page' => esc_attr($amount),
'tag' => esc_attr($tag),
'tag_id' => esc_attr($tag_id),
'orderby' => esc_attr($orderby),
'order' => esc_attr($order),
'key' => esc_attr($key),
'meta_key' => esc_attr($meta_key),
'post_type' => esc_attr($post_type),
'post_status' => esc_attr($post_status));
$tag_posts = new WP_Query($args); ?>
<?php if ( $tag_posts->have_posts() ) : ?>
<div class="taglist-container">
<ul>
<?php while ( $tag_posts->have_posts() ) : $tag_posts->the_post(); ?>
<li>
<strong><a href="https://wordpress.stackexchange.com/questions/119828/<?php the_permalink(); ?>" rel="bookmark"><?php search_title_highlight(); ?></a></strong>
<?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?>
</li>
<?php endwhile; ?>
</ul>
</div>
<?php endif;
$result = ob_get_clean();
return $result;
}