First, always make sure you have updated the game and your device OS to their latest version as many issues are simply linked to this.
Also ensure that the people you are trying to play with have the same game version as you do as this can cause compatibility issues.

Another possible reason is that you can not join a game when you are on the ignore list of one of the players.
This list helps getting rid of players that you don't like to play with (because they are offensive, rude, unpleasant, too slow, etc.).
Of course, you should not add to the ignore list the players that you wish to play with.
This might be what's happening here!

Please check the ignore list of both players involved:
  • Launch the app and press 'Play' in the main menu
  • Press the 'Online' option in the game menu
Here is how you can invite them directly :
  1. Go to your online lobby and tap on "players"
  2. When you reach this point, and you can see the "ignored" button, press it to check the players who are in it
  3. If some of them are there by mistake, just remove them to be able to play together again.