It is not mandatory to have a job to apply for a US visa.
However, getting a US visa requires convincing the officer of your intent to return home at the end of your visit. The officer is required to assume that you intend to immigrate to the United States, and it is up to you to convince him or her during the interview that you won't do so. If this doesn't happen, you'll receive a 214(b) denial. From that page:
The Consular Officer must be convinced that the applicant:
Has a home outside the United States that they will not abandon;
Is visiting the United States temporarily and will leave when the stated purpose of travel is complete;
Is able to pay for the trip; and
Meets the requirements of the visa type for which they are applying, and/or that planned activities in the U.S. are allowed by that category.
Being single and unemployed will not help you convince the officer of these things. You'll want to think carefully about whether there are other elements of your circumstances you can use to show ties to your home and that you'll return as scheduled, perhaps family members you need to take care of, school to return to, or other responsibilities at home.
You can always apply regardless of your circumstances, but since the application does involve time and money, you might consider waiting until you can demonstrate stronger ties to your home first.