Many CTF challenges will require players to write code to perform some task. For example, a script might be needed to identify whether a string is a palindrome 200 times (Nursesrun, @patrixia). More difficult challenges may require you to develop scripts to bruteforce a password, remote into a system, or even pilot a ship in battle! Most challenges can be automated, and the best CTF players will provide their solutions to challenges as scripts for others to learn from.
Like learning Linux, the only way to learn to program is to program. Remember, there are whole courses dedicated to learning the topics presented here, so make sure to take time to practice regularly. Check out some of the learning resources below, then don't be afraid to break out your programming skills while playing!
Python is a great programming language with an easier learning curve than some other languages. It is the language of choice for lots of CTF players.