Joomla 3.x ships with the files for Bootstrap 2, and due to backward compatibility this is not likely to change in Joomla 3.x series.
It's important to know that Bootstrap consists of two main areas:
- The CSS files
Joomla has those files included both as source LESS files and compiled CSS files. Joomla itself doesn't load any Bootstrap CSS files. That's up to the template to decide if it wants to use those files or ship with own CSS files.
In the backend, the active template usually is "Isis", which heavily uses the Bootstrap 2 files. Thus it makes sense to make use of Bootstrap 2 styling in your extension backend. Especially since there aren't many alternative administration templates anyway
In frontend however it's a completely different topic. You have no clue what template the user will use and on which framework that one will be based. Personally I settle on using Bootstrap 2 styling here as well for the sole reason that the core output uses those as well. Thus chances are high that a template will support those classes. Otherwise it provides an override for the output. If it uses overrides for core, your extension likely will need an override as well anyway.
You can of course add support for Bootstrap 3 as well, but that means to double your work. I would however never only provide Bootstrap 3 layouts without an option to load Bootstrap 2 ones.
This code can and should be used by extensions. Just make sure to load them in your layouts so they are overridable by templates if needed.