In my area, it is quite customary for the bridesmaids to pay for their own dresses and to take part in the bridal shower expense and planning; as well as that of the bach party. Perhaps you have never been in a wedding before and are unaware of the financial responsibilities of being a bridal attendant.
Well, now that you know, you have realized it is out of your budget and that is okay. Simply tell your friend that you had no idea that her wedding was going to require more money that you have to spend. And make it clear it is not because she is not worth it, it is because you just do not have discretionary money to spend. And let her know that your regret having to back out of he bridal party. Do not go into any other details or over talk your way out of it. Just state some simple to understand facts.
You are not the first person this has happened to. I had a friend who agreed to be a bridesmaid, long before the bride decided to have a destination wedding overseas. With two travel days, the rehearsal dinner and wedding, it had to be at least a five night trip. So, air line tickets, airport parking and five nights in a hotel, along with the cost of a dog sitter, the dress, the bridal shower, the bachelorette party and the wedding gift.....it was going to cost her $2500. just to be a bridesmaid in that wedding. She backed out, and so did one other bridesmaid and a groomsman, too. People must realize that their wedding should not be another person's financial burden and also take into consideration the time lost from work (sometimes without pay) due to wedding festivities and what not.
Lots of bridal attendants have to step down due to financial reasons. It is wise for a bride to tell a bridesmaid her financial expectations before allowing her friends to accept the position just to find out later that they cannot possibly afford it.