There are a lot of words in any language, including English, which vary though only one or two letters. These ever so slight differences, therefore, are so likely to create confusion and to make you ask yourself which word means what and whether you should or shouldn't use it in your message.
This also happens in the situation of the pair of words "dialog" vs. "dialogue". To make sure you are using them correctly and never doubt again whether it's the first option or the second one, let's take a closer look to what notorious publications and dictionaries have to say about these.
Dialogue vs. Dialog
According to Cambridge Learner's Dictionary and a series of other official dictionaries for English vocabulary and grammar, both "dialogue" and "dialog" exist and are accepted. They are both considered correct and both have the same meaning: a talk in a book/movie or a formal discussion between groups or countries.
So what makes them different? Well, even though it's not a general rule, British English tends to prefer longer words while American English goes for the shorter forms. It is the exact same situation in our case here, as well. "Dialogue" is spelled in its long form in the UK, while the US version will most often be "dialog". Apart from this slight and subtle linguistic difference, nothing should stop you from using any of these forms, as your message will be the same and correct either way.
When do we use "dialogue"?
As "dialogue" is the form of the noun generally used in UK, you will obviously use this spelling when writing to a British representative. You should be careful while making this choice especially in the context of a formal letter or official communication, as it will demonstrate you are elegant and have a good knowledge of British English grammar.
When do we use "dialog"?
This form is also correct and it will perfectly fit in a comfortable, informal conversation, be it British or American. "Dialog", anyway, will be much preferred in the US, so don't be afraid to use this spelling in your conversation especially if you are talking to an American.