The widgets themselves are not tied to a particular theme, but the sidebars that contain the widgets are – for the very reason that you suggest, namely that different layouts require different numbers of sidebars. That information is generally included in the functions.php file of the theme directory. See for example bp-sn-parent/functions.php, the register_sidebars lines.
Some information on customizing the sidebars in your theme: http://automattic.com/code/widgets/themes/
and more on the Widget API: http://automattic.com/code/widgets/api/
thank you very much, I will give a look
You can also widgetize other areas quite easily and drop BuddyPress widgets in there as you please. You can widgetize a custom page template if you want to. It’s really quite flexible. I wrote a tutorial on how to change different areas of your template files to be able to include widgets: http://wpmu.org/how-to-widgetize-a-page-post-header-or-any-other-template-in-wordpress/ That might help you.