Can a cosigner sue the primary borrower?

Anyone is allowed to sue anyone in this day and age, however, the point of having a co-signer is because the primary borrower may not have a credit profile strong enough to get a loan on their own.

When suing someone, the goal is to get paid - if the primary borrower did not have enough money or enough credit strength to get a loan, what, exactly, will the co-signer sue them to get?

So yes, a co-signer may sue the primary borrower, however, unless circumstances have changed massively since the shared loan was signed, there will be nothing for the co-signer to go after. Depending on the amount of the loan you can sue in small claims court or a higher civil court.