Q.Do pine trees affect the growth of a vegetable garden?
I ask this because my vegetable garden has not done very well the last couple of years, even though I amend with compost & fertilize & water regularly.

If the pine trees are large and overhanging the veggie garden, they yes of course, the shading would be a primary detrimental factor for a sun loving garden. Secondary would be competition from the pervasive root system for uptake of water and nutrients.
Another factor could be excessive needle drop and acidification.
Your veggie garden needs open space, full sun and free from competitive growth.