Yes this is bad/dangerous because you now have current running on the ground wire at all times. This type of timer requires a seperate neutral (whereas most switches just interrupt the hot) so that the timer can be powered when the switch is in the off position.
In your configuration, the line (power) comes in at the fixture and there is likely a 14/2 cable running to the switch for the sole purpose of interrupting the hot. The other configuration is where the line comes in at the switch which then sends power to the fixture when the switch is closed.
In order for you to use this type of timer, you need a dedicated neutral in the box with the switch. You would need to replace the 14/2 cable with a 14/3 cable (extra conductor) so that you can have a dedicated neutral from the line, and then still switch the hot to control the light.
Depending on the position of the switch and fixture it may be easy enough to pull a new 14/3 cable.
If you are looking for a schedule timer; not a countdown timer, it's not likely you'll find it with a separate switch on the same yoke. Even though electronics continue to get smaller and smaller, I don't think you'll find a combination 24 hour timer... Yet. It may be better to simply expand the single gang outlet into a double gang outlet.
If there is enough space on the wall for a double gang outlet, the biggest problem you'll likely face is removing the old box. If the switches were installed when the house was being built, it's very likely the junction box is nailed/screwed to a stud. In this case, you'll probably be looking at some drywall patching. I've found that it's often easier to make a bigger hole than you need, since you'll probably be taping and mudding either way. Drywall is cheap.
Once you've removed the old box, you can either use a traditional box that attaches to a stud (new work), or an "old work" box that anchors to the drywall by way of a couple extendable tabs.
With more space available, you can control the inside light with a standard snap switch, and the outside light with a 24 hour LCD programmable switch. The only problem you might run into using a switch like this, is that the switch will likely require a grounded (neutral) conductor. Which may, or may not be present in the box.
NOTE 1: 24 hour timer switches are available from many manufacturers, the aforementioned product is for example purposes only. I in no way endorse or recommend this or any other product mentioned.
NOTE 2: If you intend to control an inductive load, make sure the switch you choose is rated for such loads.*
Best Answer
Presumably the black and red wires are the hot and switched, corresponding to your current switch. If the box is gounded, that one's good. The issue (depending how the box is wired) may be that the timer needs a neutral connection, and if the box only has "switch loops" run to it it may not currently HAVE a neutral wire - in which case you need to get one there.
Now, when you say that there are 5 cables in the box, do you mean 5 multi-wire cables (black-white-bare/green) except one of them is red-black-white-bare/green and there are a lot of white wires connected to each other? If so, it's your lucky day, as one of those white wires will provide your neutral connection. Avoid white wires that are connected to switches, as those probably are NOT neutrals.
A picture would help a lot, but that's my educated guess, if you are using "cable" in the usual sense, as opposed to confusing it with "wire."