In what year was the US Senate formed and why was it divided into three classes?
The Senate was formed in 1789 when the Constitution of the United States was written and ratified.
The reason why the Senate is divided into three classes has to do with the overall goal of the Constitution. The Framers wanted to have the government be divided so that it would not be easy to pass laws. They did not want it to be easy for some wave of popular opinion to be rushed through and made into law. For this reason, they wanted the Senate to be elected in these classes. That way, if there were some big political "wave" (like the Tea Party movement today) it could only elect one-third of the Senators. To get a majority in the Senate, it would still have to be going strong two years later.
So the basic idea is that the Framers wanted to put brakes on public opinion. This is why the Senate is not elected all at once.