Whether you can legally work while your adjustment is pending depends on your adjustment’s underlying basis. If it is an employment-based basis, you must be in a valid non-immigrant status. The restrictions of that specific non-immigrant status would determine whether you can work. If you apply based on a family relationship, the only exception to unauthorized work or overstay is marriage to a U.S. citizen. If the basis of your Adjustment of Status is not through marriage to a U.S. citizen, then you would need to wait until the employment authorization document is acquired through approval of form I-765.