From what I know, these words are synonyms. Nevertheless, חקלאי is used more often in modern language, whereas איכר is somewhat more archaic. I doubt nowadays they would call farmers איכרים, but rather חקלאים
To be precise, חקלאי is a farmer, while איכר is a peasant. But really there is not much difference, and they may be used interchangeably almost everywhere. The comment here about איכר being somewhat more archaic is also correct.