Found this on the internet, hope this will help you .
From early times, to avoid collisions, ships underway or at anchor by night carried at least a single lantern showing a white light. There seems to have been no fixed rule about the use of lights until 1824 when two white lights were required to be shown in ships navigating the canals of the Netherlands and Belgium. In 1845 coloured lights were authorized for this purpose.
In that same year HMS COMET carried out experiments at Pithead with red, green and white lights, and 1847 Admiralty regulations called for all British steamships to be fitted in the approved manner. No such requirement existed for sailing vessels. After 1850 all steamships in the busy fairways of the open seas were required to show coloured lights by night. The colours red and green had been selected as the least likely to be confused.
The French in 1863 instituted a practice of making the lights visible on the beam as well as ahead. This led to international agreement on the use of sidelights, visible through definite arcs. About the same time sailing vessels were first required to show red and green sidelights.
Trinity House, the British pilotage authority, had ruled in 1840 that two steamships steaming toward each other by night, to avoid collision were each to alter course to starboard, thereby keeping the other ship on the port hand. The red light, indicating danger, was assigned to the side to be steered away from.
A series of conference of the principal maritime nations has produced the International Regulations for Preventing collision at Sea, in which are embodied directions regarding lights, steering and sailing rules. In the most recent revision (1953) these are greatly clarified, and are made applicable to aircraft taxi-ing or alighting on water in ocean areas. Further revisions, drafted at the 1960 Safety of Life at Sea conference, will soon be brought into effect