What is the name of your state (only U.S. law)? North Carolina. Is it legal to work under the table?
I don't think that many people understand the true definition of working "under the table". The true definition is income that neither the payer nor the payee report to the IRS. If a handyman works for cash (which none of his customers have to report to the IRS) and he doesn't report the income on his tax return either, that's working "under the table". If a server or stripper works for tips only, (it is illegal for the employer not to pay a wage) and doesn't report the income on their tax return, that is another example of working "under the table".
Either the payer or the payee might be doing something illegal, or neither of them may be.
If the payee reports their income on their tax return, the payee is doing nothing illegal.
If the payer is not required to report the income, or reports the income on a 1099 the payer may not be doing anything illegal unless the payee is an employee by IRS standards.
However, if the person is a true self employed person then paying them cash and reporting it on a 1099 is completely legit.
So, if you want to know if one specific person, either payer or payee is doing something illegal, you would have to explain the exact circumstances.