I have x guests for my wedding and y tables with z seats. Guest A can sit on the same table as guest B and guest C can not sit on the same table as guest D, ....
Given
This is an NP-hard problem, so you won't find a general solution. In fact, even finding z guests that are able to sit together at a single table is NP-hard.
However, if you don't have too many guest conflicts, then a heuristic will probably work. For example:
Pick an unseated guest G with a maximal number of incident edges (conflicts)
If G has a conflict with someone seated at each table, then fail
Else assign G at random to an available table
Repeat until all guests are seated
A slightly better heuristic involves keeping track of all of the possible tables for each guest. At the outset, each guest can sit at any table.
Pick an unseated guest G such that the size of G.availableTables is minimal
If G.availableTables is empty, then fail
Assign G at random to a table T from G.availableTables
For each guest G2 who is in conflict with G
remove T from the set G2.availableTables
Repeat until all guests are seated.
You could also modify this heuristic to make it even stronger, keeping track of, for each table T, how many unseated guests are able to fill the remaining seats. Then, when you assign a guest to a table, instead of choosing at random, you would preferentially choose tables with a lot of remaining seats and fewer people who are able to sit in them.
In practice, if a heuristic like this doesn't work after trying a few hundred randomized attempts, then it's probably going to be a difficult problem to solve.