Kun in most cases translates into only - and bare into just in most cases.
However there are a few mismatches: Bare cannot convey the meaning exactly/barely:
Han var kun 16 = (He was only 16.)
Han var kun lige 16 = (He was just 16.)
Another mismatch is expressions with not only in the meaning of more than like:
Han var ikke bare fuld, han var stangstiv = (He was not only drunk, he was downright pissed.)
Or in wishing:
Bare det var bedre vejr! Så kunne vi tage til stranden. (If only the weather had been better, then we could have gone to the beach)
Kun (only) works like a mathematical operator. Kun isolates a sample/case and excludes the rest:
Du skal kun plukke de modne æbler.! (Please only pick the ripe apples!)
Bare (just) reduces complexity by pointing to the essence - this is all it takes!:
Bilen er OK, der er bare ikke mere benzin. = (The car is OK it just needs some gas.)
Det er ikke svært! Prøv bare! (It is not difficult - just give it a try!)