St Swithin's day if thou dost rainHere's some of the background from a bbc page.
For forty days it will remain
St Swithin's day if thou be fair
For forty days 'twill rain na mair
St Swithun (Swithin) was a Saxon bishop of Winchester, who lived in the ninth century
Swithin died on 2 July 862. According to tradition, he had asked to be buried humbly. His grave was just outside the west door of the Old Minster, so that people would walk across it and rain fall on it in accordance with Swithin's wishes.Yesterday was fine and fair here - this morning it has been raining with intent.
On 15 July 971 though, Swithin's remains were dug up and moved to a shrine in the cathedral by Bishop Ethelwold. Miraculous cures were associated with the event, and Swithin's feast day is the date of the removal of his remains, not his death day.
However, the removal was also accompanied by ferocious and violent rain storms that lasted 40 days and 40 nights and are said to indicate the saint's displeasure at being moved. This is probably the origin of the legend that if it rains on Saint Swithin's feast day, the rain will continue for 40 more days.