Let's look at the app possibility first. Was this an app from the play store? If not, where did you get it? While it's possible that a malicious app could disable your networks, it's not likely. Most malware wants to steal data, not cause damage and breaking connections would prevent that.
It's quite possible that the app is just coincidental.
Here are some other possibilities ...
Your sim card went bad. Try someone else's working sim card in your phone and if it works, then you know it's not the phone.
You have a chip that went bad. While it's true that hardware fails, it's not likely that both your wifi and cellular radios would go at the same time, unless there were physical damage done to the phone. Did you drop it? Get it wet?
The other possibility is that your phone was disconnected by the carrier. Did you pay your bill? Or, did you buy the phone second hand? It could have been a contract phone that got blacklisted.