Contact the Clerk of the Court in the county where he was sentenced. Court fines, fees, and costs are public record tied to the case, and the clerk's office can give you a current balance. In many jurisdictions, you can also look this up online through the court's case management portal by searching his name or case number.
On whether you can pay it for him: in most cases, there is no legal restriction on a third party paying an inmate's court-ordered fines and fees. Courts generally care that the debt gets satisfied, not who writes the check. You would typically pay through the clerk's office directly, either online, by mail, or in person, depending on what the court accepts.
One caveat worth knowing: in certain types of cases, particularly those involving large fines related to financial crimes, fraud, or drug proceeds, the government may ask questions about the source of funds being used to pay the debt. If the case has any of those elements, be prepared for that possibility and have documentation ready if asked. For standard fines and court costs tied to a typical criminal case, this is usually not a concern.
Call the clerk's office, get the current balance, confirm the payment methods they accept, and take it from there.