Tennis courts in my area need to be booked, so it is pretty simple: have you booked? I am guessing this is for tennis courts that are not booked but you just rock up. The only way I can think is computer vision and surveillance of the courts. But it could be lowish resolution. A single well positioned ring cam could probably cover multiple courts for "is someone playing" detection.