Printing out checks yourself on your computer and printer is perfectly legal.
However to print out checks that will be accepted by banks you must use special check printing paper to print the checks out.
You also need to download some check printing software so that you can add your checking account number and routing number to the checks.
I used to print out checks for my employees using a printer at our business for the checking account tied to our business for payroll.
You just need to buy special check printing paper and download and buy the check printing software and you can use any printer to print the checks.
If you print out checks on regular paper the checks will not be accepted by any banks.