In many pre-Christian cultures May Day (May 1) was celebrated as the first day of summer, and signalled the start of the spring planting season. An April Fool was someone who did this prematurely.
Another origin is that April 1 was counted the first day of the year in France. When King Charles IX changed that to January 1, some people stayed with April 1. Those who did were called "April Fools" and were taunted by their neighbors.
In the eighteenth century the festival was often posited as going back to the times of Noah. An English newspaper article published on April 13th, 1789 said that the day had its origins when he sent the raven off too early, before the waters had receded. He did this on the first day of the Hebrew month that corresponds with April. A possible reference to April Fools' Day can be seen in the Canterbury Tales (ca 1400) in the Nun's Priest's tale, a tale of two fools: Chanticleer and the fox, which took place on March 32nd.