I can't watch .mkv and .avi files in my Sony TV

I’m going to assume that you mean you can’t view MKV and AVI files.

How are you connecting your Sony to the MyCloud? Using the DLNA server? Using the SMB file server protocol?

What Sony TV is it? I assume it’s a ‘smart’ TV, with some sort of DLNA client app.
Are you using the same media client app on the Sony TV as you were when using the PS3 as a media server?
What video formats does that client claim to support?
Was the ps3mediaserver performing video format transcoding for you?

Have you configured the MyCloud’s Twonky DLNA media server properly (in particular, have you set the Media Receiver Type correctly)?