It is best to break up the answer here into two different areas. One area is on the device side where those languages that allow creating small memory footprint and quick executable binaries are preferred. Most drivers for the sensor devices are still written in C programming language. However, as we move up the stack to middleware, you can use most mainstream programming languages. Most IoT platforms today support and provide client libraries in multiple programming languages so that development teams can select their choice of programming language and jumpstart their application development.