I just thought I'd write a short and frank introduction to classes and races for new players, so they can make semi-informed decisions about what to do now if they want to have a long-lived character. There's way more detailed information out there, but this should be enough to start you off with some idea what's going on. The whole 'play it your way' thing, while great fun to begin with, can lead you up the garden path when it comes to making a viable choice for the end game content.
Dragonknight is the best class, they make the best tanks due to their high self healing, damage shields, CC, and great resource management. They are best (or arguably second best) at stamina dps due to their high damage low cost class skills and stamina regen, they also make excellent healers due to the damage shields, and ultimates that are somewhat useful for healing. They make good magicka dps by going with the fire-mage type builds, they do awesome fire damage. Dragon knights should be imperials, or dunmer if you want to use magicka and be a vampire (and if you're not a vampire you should definitely be a werewolf).
Templar is the best healer due to its class line dedicated to healing and its healing ultimate. They are probably the second best tanks, but honestly you should just get a dragonknight to tank. They do well at the other rolls, but this is pretty much the healer class, and thus should be breton.
Nightblade is the dps class, they do quite well at stamina dps, and can even compare to dragonknights. They are also viable magicka dps, and again, they are comparable to dragonknights in this roll. They make reasonable healers, since some of their skills (particularly funnel health and sap essence from siphoning, and refreshing path from shadow) add more healing. Their veil ultimate is not bad for a healers use. They also have some really good resource management through siphoning strikes. Really though, when it comes to healing you should just get a templar, and as far as tanking goes, the nightblade can again do pretty well, but will never fill the roll of a dragonknight. Nightblades have some flexibility in race choice but best be redguard or khajiit for stamina dps and breton or altmer for magicka dps.
Sorcerer in its current state is best avoided unless you're particularly enthusiastic, since its the worst at all roles. The one thing a sorcerer can do reasonably well is magicka dps, they are perhaps on par with dragonknights for this, but their high-cost low-damage class skills pull them down. Crystal fragments and liquid lightning put out some really good damage, but at the end of the day their abilities just cost more than any other class, and do comparable or less damage. With no stamina morphs for their class skills stamina dps is almost completely unfeasible for a sorcerer. Tanking is achievable, with hardened ward for a shield and some iffy self healing mechanics, but you're better off using one of the other classes, in particular a dragonknight. Sorcerer healing is possible, but they really offer very little over any of the other classes in this role. When it comes to soloing, sorcerers many pets can trivialize the process, allowing you freely leave the computer mid fight. Sorcerers should be bretons or altmer.
By roles then
Tank: DK
Stamina dps: DK, NB
Magicka dps: DK, NB, Sorc
Healer: Templar > DK >= NB
It should be noted that balance changes over time, however in TESO's case the theme has largely stayed the same. So don't expect your sorcerer to compare to a dragonknight any time soon. Hence, if you're not sure what class you'd prefer, you should play a dragonknight, as they are by far the best class in the game. Similarly if you are unsure of race, imperial is best due to their mix of health and stam buffs.
If you're not worried about end game PVE, you'll enjoy the solo game as any class/race combo. In fact, this part of the game you really can 'play it your way', any class or race combo can excel in any role. At the end of the day though there comes a point where you really want to actually be good at what you do, and being the anchor of your group because you chose the wrong class/race is not where you want to end up. If you want flexibility and validity, then it would be a shame to reach the end game with something that isn't a dragonknight. At best you'll be pigeonholed into a specific role and at worst have no place in groups. If you know you want to dps or heal, then consider a nightblade or a templar respectively. You should only role sorcerer if you think their mechanics (toggles, pets, random procs) look particularly fun compared the other classes.