Sometimes, it is obvious from looking at a sentence, even if it has not been punctuated, if a relative clause is defining or non-defining.
My grandmother's house which she has lived in for 30 years is the one with the red door.
The essential information in this sentence is, 'My grandmother's house is the one with the red door'. In this sentence 'which she has lived in for 30 years' could be left out without affecting our understanding of the sentence. It is clearly not an essential piece of information, so it is a non-defining clause. This sentence should be punctuated as:
My grandmother's house, which she has lived in for 30 years, is the one with the red door.
The book which I am currently reading is very interesting.
In this case the whole sentence is essential. If the relative clause 'which I am currently reading' is left out, we are left with 'The book is very interesting', but we have no idea which book the writer is referring to. So, the relative clause is a defining clause, as it tells us which book 'is very interesting'. In this case the above sentence has already been correctly punctuated, and no changes are required.
On the other hand, sometimes, if a sentence has not been punctuated, we cannot tell if a relative clause is a defining clause or a non-defining clause. Your sentence would be a case in point. The sentence can be punctuated as:
The wedding, which only members of the family were invited to, took place on Friday.
This sentence tells us, (1)the wedding was held on Friday and (2)it just so happens that only family members were invited to it. In this case the clause,'which only members of the family were invited to', is a non-defining clause. It is quite possible that other weddings were also held on Friday to which only family members were invited.
The wedding which/that only members of the family were invited to took place on Friday.
This sentence tells us, (1)there was one or possibly more weddings held on Friday, but (2)the wedding we are interested in was the one to which only family members were invited. In this case the clause,'which only members of the family were invited to', is a defining clause. It clearly defines this wedding as distinct from any other wedding that possibly occurred on the same day.
In other words, the person who writes the sentence needs to determine which message they want to communicate to the reader. Having done that the writer then knows whether they need to use a defining or a non-defining clause to ensure that the reader knows what the writer intended to communicate. Once the writer knows what sort of relative clause they are writing, they can apply the appropriate rules of punctuation to tell the reader how to interpret the sentence correctly.