Android 5.0 Lollipop introduced Material Design theme which automatically colors the status bar based on the colorPrimaryDark
value of the theme.
Note by realdognose: with Material Design library it will be
colorPrimaryVariant
This is supported on device pre-lollipop thanks to the library support-v7-appcompat starting from version 21. Blogpost about support appcompat v21 from Chris Banes
Read more about the Material Theme on the official Android Developers website