In math, there can be more than one way to correctly solve an equation. Some might be easier or more difficult, but the most important thing is that you get the correct answer. For example, 2+2 and 1+1+1+1 and 2×2 and 22 all mean the same thing and will yield the same answer, but 1+1+1+1 is clunky and awkward. Writing is the same way. You can write several different sentences that all mean the same thing, but some will convey the information more succinctly or elegantly than others.
In expository writing, where the goal is simply to describe or explain a thing, the goal is to write as simply as possible. When it comes to writing creatively or persuasively though, the words that you choose can affect the mood, subtly suggest a subtext, or create a pattern or progression in the work.
Example 1: Frank skipped down the street towards the lumber yard where he worked.
Example 2: Frank trudged down the street towards the lumber yard where he worked.
Both sentences say essentially the same thing, that Frank was going to the lumber yard, but the use of the word “skipped” in the first example implies that he was happy to go, while the word “trudged” in the second suggests that he was unhappy.
Perhaps a better example lies in a non-language art. In Sergei Prokofiev’s classic symphony, Peter and the Wolf, he uses different instruments to represent characters in the story. A bassoon for the grandfather, a flute for the little bird, and french horns for the wolf. The effect is a creepingly slow (66 Beats Per Minute), ominous tone for the wolf; a light, fast melody (176 BPM) that suggests the flitting movements of a little bird; and a low and slow (92 BPM) movement for the grandfather. The same effect can be accomplished in writing through both diction and sentence structure.
If you want to improve your diction, the secret is to read a lot of good literature. If you look at the words that talented writers choose in different contexts, it will be easier for you to use words in similar ways in your own writing.