The French were sore over their loss to the English in the Seven Years War, so what better way to get back at them than to help the Americans?
As early as 1776, the French were sending arms to the Americans under a fake supply company. Most of the weapons the Americans used to fight the British were from France. Even Spain chipped in, creating their own fake supply company and giving the Americans weapons and ammunition.
The reason for the French joining the Americans was getting revenge on the British for their loss in the Seven Years war, and because they wanted to get out of the shadow of the British, who were the most powerful in Europe.
In 1778, the Americans and the French signed two treaties: the Treaty of Amity and Commerce, which strengthened trade relations between the two countries, and the Treaty of Alliance, which asserted that if France joined the war, neither country would stop fighting until America earned its freedom and that neither America nor France would make peace with Britain until both parties agreed.
In the summer of 1778, British ships fired on French vessels, and the French, as well as Spain and Holland, joined America in their war with the British. Thus, the Revolutionary war morphed into a world war.