Potawie is right, as the pepper ripens flavor and sugar increases, heat increases but then platoes and starts dropping.
If I want heat and flavor, I pick right when they reach peak color and no longer. If I want less flavor, I pick them before they ripen all the way and freeze them to prevent them from ripening further. And some peppers have more than one color stage, they can be green to yellow to red, and you simply pick them when they reach the color you desire.