I am looking for Java libraries to produce data in KML format.
It appears there are at least three Java libraries for Keyhole Markup Language (KML):
As far as the best, that would depend on your needs. JAK appears to be the best supported at the present time.