WordPress loop: Display if posts exist

You can use the has_tag function in a conditional statement to achieve what you want. Take a look at the codex page here:
Function Reference/has tag.
This isn’t 100% tailored to your specific question, but you should see how it’s working and adjust for your specific task:

<?php if( has_tag() ) { ?>
<?php query_posts( 'cat=1&posts_per_page=5' ); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> 
<div id="has-tags">
    <ul id="the-tags"><?php the_tags(); ?></ul>
  <?php the_content(); ?>
  <?php endwhile; endif; ?>
</div>
<?php
} else { 
// Whaterver else you're doing here.'
} ?>