Can an employer punish an employee for missing work, due to a court date?
The only "court date" for which an employer is legally required to allow you to take time off without penalty is jury duty. This does not mean they must pay you. Some states require employers to pay employees for jury duty, many do not.
Otherwise, there are no laws in the U.S. specifically requiring an employer to grant you time off without consequence. The "rules" for a court date are based on standard practice and the company's policies as published in its employee manual pertaining to time off.
Typically an employee is expected to give an employer some notice of his or her intent to take time off for any purpose, and this would apply to a court date equally.
At the risk of sounding facetious, an employer cannot physically compel an employee to come to work or remain at work under any circumstances. Obviously, if you have a court date, you do not want to miss it. The penalties, depending on what you're going to court for, can range from fines to dismissal of the case (if you are the plaintiff) to jail time, so you should go regardless of your employer's policies.
All an employer is obligated to do is treat you equally with all other employees and in accordance with written policies. You can generally use personal time off (PTO) or vacation time for a court date, but you cannot use sick time (if your company separates this from PTO.)
If your employer feels you have not given adequate notice, or that the amount of time you are taking off is excessive, or they are simply unwilling to deal with your absence, they are generally within their rights to terminate your employment. (This depends on whether you have an employment agreement and whether your company and/or state have an "At Will" employment environment.)
You should ask your company HR representative to be sure.