What is the difference if I say dobry brat and dobrym bratem?
It is very hard to find the why of Polish grammar!1 answer
This is a complicated topic and there is no simple explanation why different languages have different patterns. It is just how it is in Polish, nouns and adjectives have different endings depending on their role in a sentence.
For instance, in English we usually use preposition with to indicate that somebody is using something: She hit him with a tennis racket. But the same sentence in Polish is Ona uderzyła go rakietą tenisową.
So, we do not use with here but change the endings. So instead of:
rakieta tenisowa Nominative (mianownik) write
rakietą tenisową Instrumental (narzędnik).
I am planning to create a Polish grammar course soon on Repeto but in the meantime please check this guide: Polish Cases: The Instrumental Case.