Allowing the use of an underscore to separate digits in a number literal into groups dates back at least to Ada 83, possibly earlier.
A digit-separating underscore was added to C# 7.0 (2017), Java 7 (2011), Perl 2.0 (1988), Python 3.6 (2016), Ruby 1.0 or earlier (1998), Rust 0.1 or earlier (2012), and Swift 1.0 or earlier (2014).