I grow all sorts of vegetables successfully however, I always seem to have a problem growing peppers. They always end up with worms inside. Why?
Don’t grow peppers with tomatoes or egg plant. Both of these are hosts for the pepper maggot. These are brightly coloured yellow striped flies with banded wings and green eyes. They puncture the fruit usually when it is 1 to 3 cm in diameter and lay an egg inside which develops into a worm. If you picked a more resistant cultivar such as cayenne, jalapeno, tabasco, etc. you might avoid this. Sprays do not work on larvae as they are inside the pepper. If you planted later in July and early August you would miss the flies. Also you could cover the fruit for the time the fly was likely to puncture it. Also sprinkle powdered sulphur on the fruits at the appropriate time.
Ref: Diseases and Pests of Vegetable Crops in Canada
Here is a link that includes additional information: https://www.omafra.gov.on.ca/IPM/english/peppers/insects/pepper-maggot.html