This one is hard. For starts, it depends on your intentions in the forums. I will give some tips when you are commenting in a forum with the purpose of learning, educating or debating with a genuine interest in effective communication.
It is common that we do not have this genuine interest in mind when commenting, so let me list a few occasions when that happens. Sometimes without we even notice.
You are angry because the other commenter seems dishonest, manipulative, rude, pretentious, arrogant, dismissive, patronizing, offensive, obnoxious, or an attention seeker.
You are engaging with a troll that actually is all of the above.
You are so right about what you are saying that you are just basically typing a lecture, not trying to communicate with someone.
You are more interest in having fun and getting upvotes than in what the other commenters are bothering to write.
When you are not in any of those situations, then you can focus on writing better comments.
It is both about the typing and the mindset
Skip lines to separate ideas. Just like on emails, all paragraphs need white-space between them to be perceived as such and guide the reading.
Provide context, specifically about yourself. In the anonymity of forums, it is hard to understand the perspective of the person who is communicating. Try to present the dimensions of your person that are relevant to that discussion. Avoid name-dropping and boasting credentials with the goal of impressing people reading it, but mention if a credential is relevant. You can keep your anonymity and still provide a good picture of who you are to other commenters who then can exercise their empathy.
Try to answer all questions and address all topics another commenter might have. A conversion easily becomes unsatisfying when commenters are focusing just on a particular aspect of a subject — usually, the one that better suits their positions — and ignore all other dimensions that other commenters are talking about.
Even if it is a debate, think about all the other people reading that conversation that are not actively part of it at the time. Communication in forums is always one-to-many, even if it is a direct reply on a forgotten thread.
Respect all policies and etiquette of that forum. If you are not sure what they are, go try to find them before you start commenting more frequently. Forums are social groups with social norms. If you can't respect even that, it is unlikely that you will respect its members — and that they will respect you. That said, honest mistakes happen. Say sorry and change your behavior accordingly.
Never assume with certainty, from the beginning, that another commenter is plain wrong. Even if you are talking about laws of physics, it might be possible that they are coming from another assumption or talking tangentially about other topics, and what made they look just plain wrong is actually just a failure of communication. Try to clarify the point to confirm their position.
That leads to the more broad Principle of Charity. Assume coherent, rational, and strong interpretations of what commenters are saying. They will quickly prove you wrong if they are not that coherent anyway.
Do some research if it is a complex topic or to support (or change!) your opinion. Comments are not real-life politicians debates when the only thing that matter is what you can come up with in the heat of the moment. On the contrary, these are not words in the wind; they are written words that will be registered. Do some research and fact-checking related to the topics as a benefit for you, the ones you are debating at the time, and the others who will read it all later. You might learn something and change your opinion by yourself, or might do a better job educating people on a topic that you know well. Win-win.
It is ok to say things you are not sure about, as long you are transparent about it. If you do not have the time for research or couldn't find that specific article you read a long time ago, it is ok to give your opinion anyway. If yourself has doubts, make it is explicit that it is an "impression", your "intuition" or just a "first thought". Anecdotes are fine too, as long as you don't pretend it's big data from legitimate studies.
Otherwise, all tips for effective written communication suit well for forum comments, despite its bad reputation. If you find the right forum, it is a great practice to test and practice your written communication skills.