Depends on the kind of virus you want to create.
I have made a tutorial for a JAR virus, which is written in Java. But Java is only suitable in this case because of its special infection type:
-->link<--. I also made a tutorial to understand infection of viruses which uses Python (linked by Ex094). But Python is also no usual language for viruses. The tutorial was made for you to understand of the concepts, not to have a step by step guide for your own python virus.
A "typical" virus that infects Windows executables needs assembly or at least C knowledge.
Macro viruses can be written in high-level-languages like VBA and VBS for the former Word and Excel documents.
So actually you need to know your target (the file format you want to infect) before you know which language to use.
Virus programming is not a beginner task, though.
But if you just want to play some pranks (like shutting down the computer) almost every language is suitable, though you should prefer one that has direct access to Windows functions (i.e. Batch, Powershell, .NET languages)
Such pranks are most of the time no virus. A virus is a program that replicates itself and usually infects a host file.