I don't think there have been any observations of an asteroid hitting the Sun. But, since asteroids are a bit hard to see, it might have happened without our being able to see it.
On the other hand, comets have definitely 'hit' (or at least gotten close enough to be vaporized) the Sun. Comets are easier to see as they usually have long tails of material flowing off of them.
There is website all about 'sungrazing comets' that the coronagraphs on SOHO have observed:
https://sungrazer.nrl.navy.mil/ And you can watch one observed by the STEREO coronagraph in 2010 here:
https://www.youtube.com/watch?v=LHMULMMS7dk