"It costs a bomb" is an idiomatic expression, which is used to refer to something that is expensive or unusually expensive. This has been used in the UK for as early as the 1950s. For instance, a person may say, "That car is really very nice, it must have cost him a bomb". The idea is that a "bomb", which has cost a large sum of money may inflict a huge amount of damage. You may find some similar phrases that may be used interchangeably with cost a bomb such as "cost a fortune/the earth".
As this term has been popular in the UK, there was a time when the phrase created a confusion for Americans traveling in England, due to the difference in meaning and context of its usage. For instance, a performance referred to as "a bomb" denotes a success in the UK, whereas when a performance is bombed, it meant the other way in the US.