Reply the way they asked, and do it early
Use the RSVP card, wedding website, or number on the invitation — don't decline by casual text if they sent a formal invite. Replying early is the single most considerate thing you can do: caterers and seating charts are counted from your answer.
Keep it short, warm, and guilt-free
Three beats: regret, warmth, (optional) reason. 'We're so sorry we can't be there — we're beyond happy for you both and can't wait to celebrate soon.' A one-line reason is fine ('we'll be abroad that week'); a paragraph of justification isn't necessary and can feel like you're asking to be talked out of it.
If you're close, do a little more
For family or close friends, a handwritten note or a gift from the registry says 'my absence isn't about you.' A phone call before you formally decline is a lovely touch for the people you'd have stood beside.