English permits both, with a very tiny shade of meaning difference. If you used one when the other was "better," you'd typically get away with it.
From the most technical approach possible, one might have to say "It tasted good," because the act of eating occurred in the past, and that's technically when the tasting occurred. However, there are a few reasons we might use the present tense anyway.
The first reason is if we wanted to draw attention to the fact that there's still pizza. If you started with a whole pizza and ate two slices, you might say "It tastes good." You could do this because you are actually talking about the pizza as a whole, and inferring the whole pizza is good because the two slices you ate were good.
There is also another usage that I see but don't have any references for. I'll leave it to the comments and voting to see if it is reasonable. I have noticed that native English speakers will often use the present tense when describing things associated with a past event if the emotional content of the event is still fresh. If you just ate two slices of the best pizza you ever had, and have this huge satisfied grin on your face, you might reply with "It tastes good" because that taste is still lingering in your mind.
We see a similar pattern with pain. If you had a nasty breakup, and someone asked you how you felt about it, you might say "It hurt." Doing so would imply that it hurt back then, but you're over it now. You also might reply in the present with, "It hurts." That would imply that the emotional content of that breakup is still lingering in your mind, hurting you to the present day.