If you have been invited to a family wedding or wedding of a friend that is not local to where you are then you may decide to book a hotel or b and b for you to stay over the day before or/and the night of the wedding.
If the wedding is in a remote location then you may need to move fast to secure a place to stay at a reasonable price. If the wedding falls on a weekend or during the school holidays then you may have to expect to pay a little more. If you have other friends or family members going then it could be worth looking for a cottage or a holiday home and booking it for a number of families as this often works out cheaper and means you can share taxis etc.
Remember to look closely where the wedding venue is in relation to the accommodation as you do not want to have to be travelling a fair distance to get to and from the wedding especially if you are going to be booking taxis.
Booking in advance will allow you to relax and look forward to the day and often means you get a wider selection of places to choose from. You could even make a mini holiday out of it and book for an extra night or two.