These words have two specific things in common: where they come from and how they came to the English language.
All three words are Greek in origin (monologos, dialogos, synagoge) that came to English via French and Latin (meaning Greek -> Latin -> French -> English). Synagogue and dialogue first appeared around 1200, coming from Old French (sinagoge and dialoge, respectively), while monologue was imported during the 1660s from the French word that is spelt the same way.
While I am not 100% certain, I believe that the silent -ue ending became more standard when English spelling became more standarised with the advent of dictionaries as well as some prescriptivist thinking.
One of the oldest dictionaries of the French language that is still in publication are the Dictionnaire de l’Académie française (Dictionary of the French Academy, which is the body that controls the French language and sets the rules for the language). This was first published in 1694 and is still being published and updated to this day. In this version, monologue, dialogue and synagogue appear as I just wrote them, which is to this day the standard spelling of these words in English. (You can see this by going to the Dictionnaire de l’Académie française website, searching for a word and then changing the version on the left-hand side of the page under “Histoire de mot” -> 1re version).
If we compare that to English language dictionaries, although there were dictionaries before this date, the first proper (as in reliable) dictionaries appeared in 1755 with Samuel Johnson’s A Dictionary of the English Language. A quick search at the digitised version of his original publication (see link) shows that the words monologue and synagogue did not appear there; however, dialogue appears 17 times in the form we recognise today (with the silent -ue ending).
I have been unable to find electronic versions of dictionaries that existed before A Dictionary of the English Language, so I am unsure as to whether this spelling was already common in English (and so Johnson used it for that reason) or whether the dictionary influenced the spelling. Maybe someone with more knowledge will be able to help.