Apparently after the rebellion Robert needed a strong man at dragonstone to keep the narrow sea lords in check and because dragonstone is a strategically important location and a critical defensible outpost Robert required a stern, experienced, and loyal leader to maintain order, control potential Targaryen loyalists, and secure the eastern region which is why he gave it to Stannis and not Renly because It needed to be held by someone with a firm hand rather than an inexperienced youth.
By placing Stannis there, Robert secured his eastern flank, while giving the already secured seat of Storm's End to Renly.
Who else but Stannis could Robert trust with the seat of Dragonstone?