T4 stands for Text Template Transformation Toolkit, which is Microsoft's template-based text-generation framework. T4 is a combination of control logic and text blocks, which can generate any type of text file, including C# or VB source files.
The T4 code generator is built into Visual Studio and is used to generate the built-in ASP.NET MVC templates, including the standard MVC and Web API controller templates.
Tip
Oleg Sych wrote a number of very informative blog posts on how to use T4 templates and how to get optimal results by using it in your own development project. To read more, you can visit his blog at http://bit.ly/OlegSychT4.
Unfortunately, Visual Studio does not provide syntax highlighting or intelliSense support when editing T4 templates, but there are free tools available that can add these features to Visual Studio for you.