Its mostly based on what the marine thinks that they are, it does not matter if they are strong or not, but their bounty could be significantly higher than someone who is stronger than them. Since the marines are the ones that decide what the bounties will be for the pirates, they do it mostly based on what they think they should have for what they do, like for Luffy, he declared war on the world gov and also fought in marine ford and also helped with the plan in Cake Island (though the marines thought he was the one who came up with the plan hence to why his bounty went up the highest out of all). Someone like doflamingo would have a bounty higher than 500 mil given his status in the market and how powerful he is but his bounty at dressrosa was 340,000,000 which is far below how much it would be if he actively went against the marines or the world gov.