Will Smith and the rest of the 'Fresh Prince' cast didn't just reunite to chat about old times, they did it to raise big money for charity ... TMZ has learned.

Karyn Parsons, aka 'Hilary,' tells us the luncheon -- with Tatiana Ali, Alfonso Ribeiro, Will, Daphne Maxwell Reid and Joseph Marcell -- went down Monday at Nobu in Malibu. Karyn says her castmates broke bread with a family from England that won a charity auction.

She says the money will support her organization, Sweet Blackberry, ... which makes educational animated shorts about African-American history. Karyn wouldn't say how much the Brits dropped for the all-star meal, but let's face it any meal at Nobu -- WITH Will Smith -- can't come cheap. 

She added it was bittersweet because of the absence of James Avery, who died in 2013.

Pretty cool of the whole gang to donate their time.