This depends. How fast is it traveling when it comes into contact with the Sun?
If it were simply drifting along when it hits the Sun, the only significant impact would be the explosion of the antimatter reactor that powers the ship. This Stack Exchange post tells me that the Enterprise's power level is inconsistent, but it seems to be somewhere in the several thousand terawatt range (unless the plot demands otherwise), maintained over time. I have no idea how the entire thing exploding would affect a star, but my gut tells me that it would generate a solar flare with an oddly large neutrino concentration and not much else.
If it were going very fast when it hits the star, the amount of damage would increase. According to the Wikipedia page for the Enterprise-D, the theoretical maximum speed it could achieve is Warp 9.8. I'm not entirely certain what that is in actual speed terms, but I'm guessing that it's a few thousand times the speed of light (let's say 2,000c, based on the fact that Warp ~9.95 was stated by Gene Roddenberry to be ~6,400c and speed most likely increases exponentially as it approaches the limit of Warp 10). Again according to the Wikipedia page, the Enterprise-D has a mass of 4.5 million metric tons. No calculator I can think of is capable of calculating the kinetic energy of something traveling at 2,000c (or anything at c), so I'm calculating this for 0.5c and then increasing it linearly. (For the record, I did NOT tell you it was okay to do math like this, but it's the best I've got.)
These calculations tell me that the energy released is 2.503×10^29 J, or 5.982x10^19 tons of TNT. This is about equivalent to a trillionth of the energy required to destroy the Sun, so the star would still physically be there, but it would be difficult to model its exact effects because of how physics-breaking the question (let alone the answer) is.
If someone wants to correct my math, feel free to. I'm a high school sophomore with Wolfram Alpha, so I basically just plugged in numbers and did some math with the results, so my answers could easily be off by trillions in any direction.