Can I use old sets of magic cards in an EDH deck
Yes, you can use any cards you could in Vintage (except for the banned list).
See the rules on mtgcommander.net:

Commander is played with vintage legal cards, with some exceptions:

cards are legal as of their set's prerelease

The following is the official banned list for commander games. These cards (and others like them) should not be played without prior agreement from the other players in the game.
...[banned list]...



It'd be pretty silly to have to build 100-card decks with limited colors without being able to use a nice large card pool! And if you look at commander deck lists people have published online, it should be pretty clear that a lot of the really popular cards are old ones. (Not that M12 and M13 are really that old...)