The answer is the bottom left option, but I can't quite figure out why.
I'm not a fan of these types of puzzles but I think the reasoning is as follows
Rotate the central diamond image $45^o$ anti-clockwise so that their edges are now horizontal and vertical.
Then, in each row, if we take the XOR value of the edges surrounding the left square with the edges surrounding the middle square, we obtain the edges surrounding the right square.
In particular, on the bottom row, the left square has got an edge on its right-hand side and the middle square will have edges on its top and left. The result of taking the XOR of these edge values is a square with edges on its top, left and right. This is the image in the bottom left of the possible answers.