It's really simple to do. If you want to do it the easy way, I would use Serial1 with the Arduino IDE. If you have the Arduino breakout board, you only have to connect TX on RX and RX on TX and connect your 2 boards GND together and it will work.
You could also consider to do socket communication and use WiFi. You could also use Python, C++, Java, node.js...
Serial1 is used the same way as the Serial library. Just add the 1 after Serial. It is the port on the header of the Arduino Breakout. For examples, there are plenty in the example section of the arduino IDE. Yes you have to upload your program to the 2 boards individually. What exactly do you want to achieve with this communication?
I have connecteed rx and tx and vice versa, and set the common ground. Then I want one edison to send temperature value to the other one, and if the temperature sensor value is greater than 20 celsius degrees, then a red light turn on on the reciever board. If it is lower than 20 degrees, then a blue light turn on, on the reciever board. However, I am unable to do it.
Where do I put the serial1 and serial? I.e. one class only has serial1 and the other has serial, or do I combine them together in one class?
Serial is used with the serial monitor. This is for debugging on your computer.
Serial1 is used to communicate with any serial device.
With Serial1.println you will send your temperature data on your sender board.
Look at the answer of this question to see how to read the data on the rx side : http://electronics.stackexchange.com/questions/45543/how-do-i-receive-an-entire-string-as-opposed-to-1-character-at-a-time-on-the-ard
As suggested by Frederick, you need to use Serial1 instead of Serial. You can use both of them in a program.
For sending sensor data, use Serial1.println() and for reading the data, use Serial.read()
On the receiving side, check for the condition of the values received and use digitalWrite to switch on and off the leds.