(I was just about to do a little research before answering this when I was delighted to see a citation to another answer from me to a different question: Where does the phrase 「ノリが悪い」 come from and what is the meaning?)
Rather than repeat this answer, I think it is enough to say that you have the equivalent expression in English and, as often happens, we have found an almost identical metaphor in Japanese:
調子 means tune or tone.
乗る usually means ride, which is roughly an intransitive equivalent of carry ("allow oneself to be carried")
"Don't get carried away" is in a literal sense similar to synchronising one's action to the music in place of "thinking before you act".
It is also an example of how almost identical expressions in English and Japanese differ because they are passive in one language but not the other (or transitive in one language but intransitive in the other)- in this case we "get carried" in English (passive) but ride in Japense (active). Both are intransitive.
You can remember this as a colloquial expression and use it in polite company as you would in English but it is also a nice example of how a basic verb we learn quite early in our Japanese studies can have as many and often similar meanings as its English equivalent. Other examples include 取る・to take or 飛ぶ・to fly.