The most common theory of the origin of April Fools' day holds that it dates from 1582, the year that France adopted the Gregorian Calendar. The new calendar switched the New Year from what is now the end of March (around the spring equinox) to January 1st. The people who continued to celebrate the New Year on April 1st became the butt of pranks and jokes. This became an annual celebration which spread throughout Europe and other parts of the world.
However, an earlier reference to April Fool's Day occurs in a Dutch poem published in 1561. There are also traditions of jollity and tomfoolery dating all the way back to antiquity. The Romans celebrated a festival on March 25 called Hilaria, marking occasion with masquerades and general good cheer. It's not unreasonable to suppose that the calendar served more as an excuse to codify a general spirit of mirth already associated with springtime.