So we want the distance from the point (x,y) to be equal from both the x axis and y axis
The x axis could be represented as y=0 and y axis as x=0
Therefore:
Equating the distance from the point to the x and y axis
|x-0|=|y-0|
|x|=|y|
This means that y = +/-x
If you draw this graph, you can see why the points on the line are equidistant