Since the majority of themes have been created before the release of WordPress versions 2.1.x and 2.3.x, respectively, users upgrading to these versions may encounter issues with their active themes.
There are two main reasons that can cause themes to break in the new versions:
If your theme runs direct queries on the database - you may want to consider finding a new theme. Instead you should look into using WordPress' own template tags and functions. However, if this is impossible, please read about the new taxonomy system introduced in WP 2.3.
This should be relatively simple: visit the template tags page in the Codex and check your template files. All the deprecated template tags are marked stating in which version they were dropped. Replace them with the newly introduced, updated template tags.
The most common problems occur with the Category Tags and Links Manager tags but it is advisable to check the other template tags, too. If the sidebar displays errors after upgrading, you should open the active theme's sidebar.php file in a text editor and find the template tag that displays your categories, for example. If you see something like
<?php wp_list_cats('arguments'); ?>
it should be replaced with
<?php wp_list_categories('arguments'); ?>
because the former has been deprecated in WP 2.1.
In a similar way all the deprecated template tags should be replaced with their new versions or the newly introduced tags with the proper parameters.