You can actually watch it in any order. Having seen both of them except for the same protagonist they don't have any link between them.
Handa kun is the anime in which protagonist is a high school student. This one leans highly towards comedy than slice of life. But it's definitely fun to watch.
Barakamon is more the typical slice of life anime with bits and pieces of comedy, it has a sense of purpose unlike Handa kun which is just everyday events. Here Handa kun is grown up and is trying to find some inspiration.
tldr: watch whichever you feel like watching.