Could Harry's knowledge of raspberry jelly being Dumbledore's favorite be important later?

Albus Dumbledore's favorite jam flavor was raspberry, yes. He tells Harry this in case Harry ever needs to check that he is talking to the real Dumbledore and not an impersonator.

It is not important or relevant to the plot of the book although the fact that Dumbledore doesn't believe it would help tell between the real him and an impersonator (he said if he were a Death Eater, he'd find the answer out first before impersonating him) shows us a little bit of how Dumbledore's brain works.