Warm water, a little mild soap and a soft brush, cleaning the front, the post and the back, then rinsing thoroughly and drying with a soft cloth.
Diamonds attract grease, and earrings collect more of it than any other piece because hair products, cleansers and skin oils all reach them. A diamond earring that looks dull is almost always dirty rather than damaged.
Check friction backs for grip while you are cleaning, and put earrings in after hairspray and perfume rather than before.