It is, technically, legal to collect unemployment while your Social Security disability application is pending, because the standards of disability under Social Security's rules are not the same as the standards for "able to work" under unemployment.
Be aware, though, that many Social Security judges do not look kindly on this. Even though they know it's not technically against the rules, some judges view it as "double-dipping" and may ask you to explain at your hearing why you claimed both benefits. You will definitely want to hire an experienced Social Security disability attorney prior to your hearing. An attorney will be able to develop your medical proof in the best way for Social Security's standards, and will protect you as much as possible at the hearing. If the judge denies your claim for an impermissible reason, then the attorney may be able to help you appeal, as well.
As far as SSI or SSDI claims, collecting unemployment does not automatically disqualify you from collecting Social Security Disability. However, if you go to a hearing, the judge may use the fact that you stated to unemployment that you are ready, willing, and able to work as a factor to deny your claim. Of course any money you collect from unemployment could reduce, or depending upon the amount, eliminate your disability benefits for the months you get unemployment.
The Chief ALJ for Social Security has sent a memorandum to all ALJs reminding them that you can not be denied solely because you collected unemployment benefits. However, collecting benefits may be used to deny benefits if it is supported by other evidence that you are not disabled.
While it may take some time to be approved for benefits. File right away. The longer you are out of work the greater chance you will not have enough credits to qualify for SSDI. In addition, you could be entitled to back benefits depending upon when determine you were disabled.
Actual legal advice can only be provided by an attorney licensed in your jurisdiction, with experience in the area of law regarding your question.