This paper describes our recent efforts to optimize photo-electrochemical (PEC) etching for fabricating recessed-gate aluminum gallium nitride/gallium nitride (AlGaN/GaN) high-electron-mobility transistors (HEMTs). Selecting the proper light wavelength and voltage conditions enabled PEC etching on AlGaN/GaN heterostructures to produce smooth and flat surfaces. Self-termination phenomena observed under optimal PEC condition were useful for precisely controlling the etching depth in the AlGaN layer. Two types of HEMTs, i.e., Schottky-gate and metal-insulator-semiconductor (MIS)-gate, were fabricated. A recessed-gate AlGaN/GaN structure fabricated with PEC etching showed positive threshold voltage, and its variation was very small with a standard deviation of only 0.019 V for the Schottky-gate HEMTs and 0.032 V for the MIS-gate HEMTs. A recessed-gate structure with PEC etching showed better current transport controllability with a small subthreshold-slope than that of planar-gate and dry-etched-gate AlGaN/GaN structures.