How does Theoretical Computer Science relate to security? When I think of software that is insecure I think that it is "too useful" and can be abused by an attacker.  So in a sense securing software is the process of making software less useful.  In Theoretical Computer Science you aren't working with the real world.  So are there any security concerns when working with pure theory?  Or the other side of the coin, does Theoretical Computer Science affect the real world of people getting hacked?  If so,  what security topics are considered Theoretical?
Your intuition that "insecurity" is due to software that is "too useful" is correct, in a sense. There is a large and growing theoretical literature on "differential privacy" that formalizes your intuition. See for example, here: research.microsoft.com/en-us/projects/databaseprivacy/dwork.pdf

Here, we think of the input to an algorithm as being a "database", and the algorithm is "insecure" if it reveals too much information about any one person's data in the database. An algorithm is $\epsilon$-differentially private if the algorithm's output does not depend much on any one input: specifically, changing a single entry in the input database should only change the probability of any output of the algorithm by at most an $e^\epsilon$ factor.

Of course, making an algorithm private makes it less useful: a $0$-differentially private algorithm produces outputs that aren't even a function of the inputs at all! But it turns out you can try and carefully balance the tradeoff between privacy and utility, and can get very private algorithms that nevertheless are very non-trivially useful.