a. Produce hormones which, prior to birth, cause the development of gender-specific traits, and at puberty, cause the development of secondary sex traits. Testosterone for males, Estrogen and progesterone for females.
b. Produce gametes (sex cells) -- sperm in the case of males, eggs in the case of females.
c. Make young boys giggle.

Gonads in the lighting, gonads in the lightning -- gonads in the rain!