Insufficient light looks to have been an issue for the plant because it is etiolated, but quite possibly the main problem was lack of pollination. Peppers are self pollinating, but they need moving air, like a breeze or wind around them for that to work, so hand pollination is safest in these circumstances.
I can't tell what size the pot is, though it does look as though the soil level is a bit low - it's usual to grow peppers in 9 inch pots, with the potting soil about a quarter inch below the rim. Because the fruit you've got is relatively small, the plant might also have gone a bit short of water, especially after the flower buds had formed, and that would cause any flower buds to abort prematurely too.