Lights at the end of both wings of any airplane Can anyone please explain to me why there is one green light at the end of wing and on the other side there is red light? what is the purpose of it and why it uses different colors like red and green instead of same color light?

The question is not about the position of the lights but why they use different color lights? like red light on the left side and green light on the right side. Is there any specific reason for that?
Same as on ships, the navigation lights (green on right side, red on left side, white on aft tip) are there to allow visual judgement about another vehicle‘s position and orientation (and thus relative headings) at night. E.g: 


if you see red and green, you are looking head on at another vehicle
if you see only green, you are looking at the right hand sector of the other vehicle
if you see red and white, you are looking at the left hand aft quarter


and so on.