You can apply for WBS if you have limited funds at your disposal for your livelihood, e.g. due to your limited income or because you receive benefits from the Social Welfare Office or Jobcentre. The level of income which can make you eligible for WBS varies from state to state. In principle, as an individual entitled to WBS, you may not have more than € 12,000 at your disposal per year. In some federal states, however, you may earn more and still have the right to WBS. Make sure you inquire at your local Housing Office ("Wohnungsamt") about the income limits in your federal state. You can find the Housing Office responsible for you by googling the word "Wohnungsamt" and the name of your district.
The second essential prerequisite for obtaining WBS is a residence permit which is valid for at least one year- and it also applies to those with student and work visas.