There have been several articles published regarding the recent legalization of marijuana in Canada and how it could affect an individual's ability to travel to the U.S.
While marijuana has been legalized in Canada and some U.S. states, it remains a Schedule I controlled substance under the federal Controlled Substances Act (CSA). Schedule I controlled substances are those that have been deemed under the law to have high potential for abuse with no accepted medical use.
Since U.S. Customs and Border Protection is a federal agency, it is bound by the federal laws, including the CSA. Accordingly, the recent legalization of marijuana in Canada will not alter the application of the CSA or the Immigration and Nationality Act at U.S. ports of entry. Legalization of marijuana in Canada will not protect an individual from adverse U.S. immigration consequences.
A well-written article on the subject can be found here: Read Article
CBP also released a statement on Canada's legalization of marijuana and crossing the border: Read CBP Statement.