Can goniometer be used to diagnose genu valgum or genu varum?

Yes, a goniometer is. An instrument that measures angles. In genu valgum, knees are angled inward, and in genu varum, they bow out. With a goniometer, a precise measurement can be taken and recorded for reference. A less precise way would be to measure the distance between the ankles with the legs extended for valgum and between the knees for varum.
Goniometer. yes, you can use a goniometer to diagnose genu varum or valgum.
While it can be. The diagnosis can be made by visual inspection.