While Sitecore itself is written in C#, that doesn't necessarily require a solution to be built in C#.
It is an ASP.NET-based product, so any language supported by ASP.NET will work. The most common of these are VB.NET and C#. C# is by far the most popular (and with good reason), however, you will find there are numerous languages that could be used if you really wanted to.
The key limitation is Visual Studio. Most .NET devs use Visual Studio and its designers and project systems are built around emitting and compiling C# and VB.NET only. If you're prepared to use other tools it should be completely plausible to code in C++ or Python.NET or F# or J# or COBOL.NET or ...
EDIT: this is an old post, and VS/VSCode have come a long way since, as such there are now numerous languages that can be used as 'first class citizens' in .NET - I believe there is even tooling for PHP these days if you're so inclined. C# is still the easy favourite FWIW.