I mean, is there a difference between sound of keys. Like, what is the point of writing some melody in a particular key if the melody would be the same if you, for example, raise all notes by one tone?
Yes, sort of, it depends.
Depending on the instrument, different chords may have different voicings. Think of a guitar, for example - an E major (at the 1st fret) would typically be voiced as EBEG#BE, whereas an A major would typically be EAEAC#E. It's not strictly a transposition up a 4th.
For a single-note instrument, chord voicings wouldn't matter, but the instrument may respond differently and have a different timbre at different pitches. A trumpet, for example, seems to have fewer overtones and sounds less "brassy" at higher notes compared to lower notes (that may partially be the player's technique, but that's a consideration when deciding where your melody should be played).