Will this optocoupler circuit work for sensor and DC motor?
As suggested in the comments, I'm not sure on why you used zeners, expecially on the MCU side where the GPIOs are well specified.
I didn't check the computations (I'm lazy) however the golden rule with transistor output optos is to check the range of CTR: your part can do 50-600% if not binned so work with that.
An 'excess' current is not a problem since it's limited by your R3/R5.
Nominal current for the led is 20mA, with some margin, of course. I don't know what your '24V' sensor can source, you need to check it. Also an MCU GPIO rarely can source so much (PIC are the big exception); check your datasheet to be sure.
EDIT: I reread the question and it's a simplelink cortex, I know them and they are quite anemic as GPIO goes (MSP430 are even worse). They are specced at 8mA on 'high drive' pins and 4mA on the other ones. I would consider some kind of booster for driving the LED: a MOSFET, a BJT, a spare logic gate you have around. Having 8mA at best with a 50% CTR would mean 4mA on the collector, 4mA from a standard GPIO would enter a penalty zone in the CTR chart so you would have less than 2mA on the collector. It can works if the signals are slow and there isn't too much noise around. Be sure to design the drop resistor for the maximum Vf possible on the led (1.4V), in this case. If you calculate it for a Vf of 1.2V you risk to have even less current available if you are unlucky!
Of course you could choose to go for a lower current, like 10-15mA, however be careful that the CTR could be even worse (figure 2 in datasheet). That said, in the worst case, you have a 50% CTR. This means that when you put 20mA on the LED, the output transistor can sink at maximum 10mA.
This dictates the pullup on the output. Unless you are signalling at fast rates it doesn't really matter. You are driving high impedance inputs (some control pins) so you only need to be sure that with your 10mA available (in the worst case) the line can go to 0V (well, actually it can't since there's the output Vce, but that's trascurable, check figure 5). Do some math and you'll see that your 4.7k is adequate.
However, be careful with your output capacitor. I guess it's for noise immunity and when doing motors is a good idea. When you activate the opto the output goes to 0 almost immediately (subject to the opto propagation time, some µs, figure 6). When the line needs to rise, however, the load resistor needs to charge the filter. So total turnoff time is more than shown in figure: the figures shows the time needed for the internal capacity, and you should add to that (about 80µs, from the chart) you filter. 100nF and 4.7k have a tau of 470µs so you turnoff time would be more than 1ms.
That could be significant or not, depending on the application. You can speeding it up simply reducing the load resistor. If you do the math I wouldn't go lower than 680 ohm, I'd stick with a minimum of 1k for that (that would be about 5 times faster!).
PS: these are all worst case and best practice for design. If it's a one off circuit and you are lucky just design for the 'typical' values and it may even  work!